Created
January 20, 2012 13:49
-
-
Save mmrwoods/1647449 to your computer and use it in GitHub Desktop.
MySQL maintenance crontab file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# note: MySQL_maintenance.pl can be obtained from http://danbuettner.net/mysql-tools/ | |
# check, optimise and repair MySQL databases (extended check on Sunday, quick every other day) | |
15 3 * * 0 root nice -n 19 /usr/local/sbin/MySQL_maintenance.pl --check-type=extended --optimize --repair --exclude-dbs=information_schema | |
15 3 * * 1-6 root nice -n 19 /usr/local/sbin/MySQL_maintenance.pl --check-type=quick --optimize --repair --exclude-dbs=information_schema > /dev/null | |
# dump all mysql databases once every 24 hours | |
15 4 * * * root nice -n 19 mysqldump --opt --all-databases --allow-keywords | gzip -9 > /var/local/backup/mysql/mysql_all.sql.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment