Last active
February 7, 2017 13:48
-
-
Save tlongren/85e0d7d04cd507b1ec53 to your computer and use it in GitHub Desktop.
Backup and Compress All Databases On Your MySQL Server
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
#!/bin/sh | |
rightnow=`date +%Y-%m-%d_%H-%M-%S` | |
/usr/bin/mysqldump -uroot -pyourpasswordfornoprompt --opt --all-databases --single-transaction | bzip2 -cq9 > /home/tyler/mysql-backups/full-$rightnow.sql.bz2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment