automysqlbackup
OIT does not backup live MySQL databases, so we need to do a dump to that our data is backed up.
See: http://sourceforge.net/projects/automysqlbackup/ for the code.
To set up:
- mkdir /var/lib/mysql/backups
- chmod 700 /var/lib/mysql/backups
- Download the script to /etc/cron.daily
- chmod 700 /etc/cron.daily/automysqlbackup.sh.2.5
- Set up a DB user with SELECT on all DBs in MySQL:
GRANT SELECT, LOCK TABLES ON *.* TO 'backup-user'@'localhost' IDENTIFIED BY 'makeupyerownpassword'; FLUSH PRIVILEGES;
- Edit the script to taste - fixing at least the username, password, list of databases to backup, and admin email address.
- service crond restart

