Created
December 16, 2013 20:15
-
-
Save grandmanitou/7993601 to your computer and use it in GitHub Desktop.
Dump all databases from mysql - one file per database - then compress to zip
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 -s -r -uadmin -p`cat /etc/psa/.psa.shadow` -e 'show databases' | while read db; do mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` $db -r ${db}.sql; [[ $? -eq 0 ]] && zip ${db}.zip ${db}.sql -r9; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment