Now when my blog is growing a need for backup is growing. After a short google search I found exactly what I want, automysqlbackup.
It is a shell script that has very modest requirements list:
- mysqldump, included in mysql client
- gzip or bzip2 if you want it compressed.
- mail if you want the status of the script to be emailed.
Features:
- Backup mutiple MySQL databases with one script. (Now able to backup ALL databases on a server easily. no longer need to specify each database seperately)
- Backup all databases to a single backup file or to a seperate directory and file for each database.
- Automatically compress the backup files to save disk space using either gzip or bzip2 compression.
- Can backup remote MySQL servers to a central server.
- Runs automatically using cron or can be run manually.
- Can e-mail the backup log to any specified e-mail address instead of “root”. (Great for hosted websites and databases).
- Can email the compressed database backup files to the specified email address.
- Can specify maximun size backup to email.
- Can be set to run PRE and POST backup commands.
- Choose which day of the week to run weekly backups.
Download it, modify some parameters and put in /etc/cron.daily and now your database is backuped.
One Response to “MySQL database backup automysqlbackup”
Leave a Reply
You must be logged in to post a comment.
March 7th, 2009 at 10:31 pm
[…] have hinted about automysqlbackup in an earlier blog. Of course an important script like this should be monitored by Nagios or op5 Monitor. In my […]