Hey Brendan, This might be a good starting point - its a pretty handy bash script for backing up databases.
http://sourceforge.net/projects/automysqlbackup/ Then you would only really need to write the restore side :) Cheers, Aaron On Tue, Aug 17, 2010 at 8:30 AM, Brendan Brink <[email protected]>wrote: > hi there, > > Am wanting to automatically create a php script to create a copy of a > database onto a different server. > > The script would run each evening at midnight. > > Unfortunately, we are not able to simply write each DB transaction to > both databases on the fly. > > The database has the following statistics: > > 127 tables > 237,000 rows > 30MB in size. > > It is a MYSQL5 database. > > Does anyone know of a script they have used that can handle this? > > Ideally want the database to be backed up to a functional secondary > database, so that we can switch to it if the original server goes > down, and hence the data would be new as at the last midnight. > > Looking forward to your advice / information regarding this. > > Thanks > Brendan. > > -- > NZ PHP Users Group: http://groups.google.com/group/nzphpug > To post, send email to [email protected] > To unsubscribe, send email to > [email protected]<nzphpug%[email protected]> > -- Aaron Barnes = +64 27 469 5867 = http://twitter.com/spastk = sry_not4sale on irc.freenode.net -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
