Web Hosting Talk







View Full Version : Automated MySQL Backups?


Acert93
04-15-2007, 03:11 PM
I have a handful of hosting accounts, each with a couple MySQL databases, and I am looking for a MySQL backup script that will meet the following needs:

1. Can be installed on a number of domains.
2. Can backup more than 1 database per domain.
3. Backups can be dated (for example: MySQL1_4-15-2007, MySQL1_4-14-2007, etc) and preferrably deleted after a set number of days (like 7 or 14)

Other options would be nice, like being emailed the database backup (could be a problem with size as some are about 8MBs after being compressed; my host only allows SFTP an no FTP as well).

Right now I am manually backing up all the databases every week which is time consuming--and I would definately like to do it more frequently.

What are others doing for database backups? Any recommendations? A free opensource app would be great, but I would be willing to pay a small sum if the software easy to use, reliable, and meets all my functionality needs.

Thanks :) Joshua

Extreme43
04-16-2007, 05:03 AM
If you can wait a week or so, we may have something available at our site. Cast-control.net

I wrote a php/batch file that runs from your desktop (i run it from our development server) that downloads your databases every x hours (I have 2 hours set so we do not loose any client information or orders). It deletes all backups from the previous month.

foobic
04-16-2007, 07:51 PM
Your host's restrictions would disallow my preferred option (dump the databases and use rsync to "pull" them to another server) but you may still be able to set up a cron job running a script that creates the dumps and transfers them using sftp (or scp?) to an external backup service (eg. bqbackup). Email is not a good option for file transfer.

There are plenty of shell scripts and PHP scripts around to do something like this - first find out what your host will let you run.