Created
February 21, 2014 20:30
-
-
Save salcode/9142815 to your computer and use it in GitHub Desktop.
Shell Script to dump all MAMP DBs into separate files
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
# based on http://www.commandlinefu.com/commands/view/2916/backup-all-mysql-databases-to-individual-files | |
# but modified for the MAMP path and to include default root/root as username and password | |
for I in $(/Applications/MAMP/Library/bin/mysql -u root -proot -e 'show databases' -s --skip-column-names); do /Applications/MAMP/Library/bin/mysqldump -u root -proot $I | gzip > "$I.sql.gz"; done |
Thanks for sharing - very helpfull!
Thank's, you save 1 hour of my life :)
Thanks!
Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, had to do this today and it worked fine! 😊