Last active
December 16, 2015 11:59
-
-
Save elidickinson/5431315 to your computer and use it in GitHub Desktop.
mysql backup oneliner (assumes proper permissions set in .my.cnf)
This file contains hidden or 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
mysql -e 'show databases' | while read dbname; do mysqldump --complete-insert --single-transaction "$dbname" | gzip > "$dbname".sql.gz; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment