Created
March 1, 2013 16:00
-
-
Save dgeske/5065588 to your computer and use it in GitHub Desktop.
Backup All MySQL Databases into Individual Gzipped Files in Current Directory
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
for db in $(mysql -e 'show databases' -s --skip-column-names); do mysqldump $db | gzip > "$db-$(date +%Y-%m-%d).sql.gz"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment