If you want to do a database backup with no downtime, replicate to a second mysql machine. You can stop the slave and perform a dump. Then after the dump is complete, it will sync back up upon restart. If you're really tight on hardware resources, you might even be able to start a second instance of mysql (listening on a different port/socket) and do it all on the same machine.

~Rolan

Anthony Wlodarski wrote:

I was confused on the relevance of this topic but since PHP and MySQL go together like PB&J I thought it would be relevant.

It has gotten to the point that the application that I built for candidate tracking is growing astronomically so now I was given the task of backing up our data. So far our Apache/Drupal installation is backed up and SCP’ed to a secure server. My one big problem is backing up our MySQL database. Does the script “mysqlhotcopy” have the same drawback as just copy the files manually (frm, MYD, MYI) in the sense that the server can’t be updating anything. To be honest I can’t guarantee that no one in the office will not be using the system at certain times so it might present a problem. Would it be easier to just to script something that follows this logic:

Pre: rename index.php, copy in temp file with downtime message

1.) Stop daemon.

2.) Copy all the table files *.frm, *.MYD, *.MYI files, tar/gzip them

3.) SCP archive offsite

4.) Delete temp folder

5.) Restart daemon.

Post: delete temp file, rename file back to index.php

Is it unrealistic for my office to expect 100% uptime, even at 3:30 am in the morning (those whacky recruiters).

/Anthony Wlodarski/

[EMAIL PROTECTED]

------------------------------------------------------------------------

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to