Backing MySQL Up
<1 min read
I've seen quite some talk about various Automatic MySQL Backup scripts. Maybe I'm missing the point, but backing up MySQL databases is not rocket science. I use a very simple logrotate script:
Logrotate provides all kinds of configuration options. There's really no need to reinvent the wheel.
/etc/logrotate.d /mysql-backup /opt/backups/mysql-backup.sql {
notifempty
daily
nocreate
rotate 15
missingok
compress
postrotate
# just if mysqld is really running
if test -n "`ps acx|grep mysqld`"; then
/usr/bin/mysqldump --user=USER --password=PASSWORD --add-drop-table --add-locks --all --extended-insert --quick -A > /opt/backups/mysql-backup.sql
fi
endscript
}
Comments
2 (Closed)
Marc
Jun 21, 2006
Erik C. Thauvin
Jun 21, 2006
That InnoDB hot backup solution does sound interesting.
E.