Ever more complex backup scripts

TOP del.icio.us

My server requirements are fairly simplistic compared to some setups as I only use Apache, PHP and MySQL on my actual web servers. All the other stuff like DNS and email are handled by other servers managed by our hosting company. This means that if I keep a copy of the httpd.conf and cron job files then all I need to do is take regular copies of all the web files and the MySQL database store. That way I can get back up and running even if I get a complete hard drive failure within a few hours using the original server image. Sorted.
 
The only problem is that I want a nice automated set of scripts that will take daily backups of the database, weekly backups of the web files and do it in a completely redundant way.
 

After a fair bit of messing around I?ve managed to get two identicle Linux boxes that I?m going to use as development servers, one for each of the dedicated servers we?re getting. Using FTP from protected directories and mysqldump run by cron with plenty of error checking and reporting by email. The same thing is done by tar and gzip to the web files. All these files are then copied by a third server onto our windows file server. All these servers perform error checking on each other and if something hasn?t been done then they report it by email. The final stage is to FTP the weekly backup to an offsite backup server which also performs error checking on the main office servers. This way, if something is not working, it gets reported so everything from individual server crashes up to complete power failure or loss of internet connection on one of the sites is flagged up.
 
Just got to wait for a week or so till we get through the hassle of moving the servers over and then I can test this whole lot.

Leave a Reply