Last active
August 29, 2015 14:23
-
-
Save ryanmaclean/99a34df15e43f0d2bbe5 to your computer and use it in GitHub Desktop.
MySQL Dump One-Liner for Cron
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
0 0 * * * /usr/bin/mysqldump -u mysql_adm -P 3306 -h 127.0.0.1 -pPASSWORD DBNAME | gzip -c > /tmp/backups/DBNAME`date +\%d-\%m-\%Y`.gz && sudo mv /tmp/backups/* /media/local-location/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment