WipeOut's - Automatic MySQL Backup
How AutoMySQLBackup started..
I needed to archive my MySQL databases and after searching for some way to do it I gave up and decided to write my own.. If you are here I guess you are looking for the same thing. Well lets hope you have found what you are looking for..
AutoMySQLBackup Script Features..
The AutoMySQLBackup project
has now been moved to Sourceforge.net for better maintainence.
Rate The AutoMySQLBackup Script...
Let others know what you think of it..
I tried to keep the requirements to a minimum, I personally don't like scripts that have lots of requirements and that I have to spend hours getting the requirements sorted out before I can use the script.
The AutoMySQLBackup script
only requires mysqldump (A standard utility provided with the mysql
client) and gzip or bzip2 for compression of the backup files.
What AutoMySQLBackup does..
Every day AutoMySQLBackup will run (if setup on /etc/cron.daily) and using mysqldump and gzip will dump your specified databases to the /backups/daily directory, it will rotate daily backups weekly so you should never have more than 7 backups in there..
Every Saturday AutoMySQLBackup will again backup the databases you have chosen but they will be placed into /backups/weekly, these will be rotated every 5 weeks so there should never be more than 5 backups in there..
Every 1st of the month AutoMySQLBackup will create a backup of all databases and place them into /backups/monthly. These will never be rotated so it will be up to you to do your own house keeping. I would suggest taking a copy of this offline every month or two so that if you have a hard drive failure you will be able to restore your database..
The install is as simple as editing a few variables in the AutoMySQLBackup file. The full setup is documented in the AutoMySQLBackup script file below the variables section..
Here is a quick minimum setup step by step..1. Download automysqlbackup.sh and place it into your /etc/cron.daily directory or your home directory.
2. Edit (at least) the following lines :-
3. Make the file executable
:- chmod u+rwx
5. That's it.. Now you can
run it using the command line "./automysqlbackup.sh" or if it is in
/etc/cron.daily it will run each day when cron runs.
Contact me: wipe_out at lycos dot co dot uk