Automatic MySQL backup using automysqlbackup Print

  • 0

Sooner more than later, you will regret not having proper backups of your MySQL databases. Fortunately, there is a simple script that can automate this task for you. It's called automysqlbackup. Here's a quick howto to get you started:

  1. Download automysqlbackup
  2. Extract the file
  3. Run installation script (install.sh)
  4. Edit configuration file (/etc/automysqlbackup/automysqlbackup.conf)
  5. Update at least CONFIG_mysql_dump_username, CONFIG_backup_dir (make sure that this folder exists and is writable by the user who will be running the script), CONFIG_mysql_dump_password, your rotation settings, CONFIG_mailcontent, CONFIG_mail_address
  6. Add a cron job to run the script automatically (i.e. 00 1 * * * root automysqlbackup)
  7. Test your installation by first running automysqlbackup manually and then by keeping an eye out to test your cronjob too.

Was this answer helpful?

« Back