On 2/20/2011 5:26 AM, Manolo Padron Martinez wrote: > Hi: > > I would like to know what its the better way to make a copy from an > apache+mysql+php webserver. > > I've been thinking about it and probably the best solution its to stop > al services before to make the copy, but I'm looking for a way to do > it without stop the service. Any idea? > > Regards from Canary Islands > Hello Canary!
The best way to do it is to dump the mysql database periodically (I do it nightly) and let the scheduled backups pick up the dump (put it in a directory that gets backed up). This way you don't need to interrupt anything and the database is portable to different versions should you need to restore from a crashed system (and the current version is upgraded). I also do this with the bacula database on the Director even though it gets backed up by bacula, like this: 30 0 * * * /usr/bin/mysqldump bacula > /usr/src/scripts/bacula.dump.mysql > /dev/null 2>&1 Of course you need to add the appropriate entries in ~/.my.cnf, mine looks like this: # more .my.cnf [client] user = root password = SsEeCcRrEeTtPw host = localhost [mysql] database = mysql Regards, Randy ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users