Skip to content

Instantly share code, notes, and snippets.

@chicks
Created April 17, 2014 17:28
Show Gist options
  • Save chicks/10999660 to your computer and use it in GitHub Desktop.
Save chicks/10999660 to your computer and use it in GitHub Desktop.
for t in $(mysql -NBA -D <database_name> -e 'show tables')
do
echo "DUMPING TABLE: $t"
mysqldump <database_name> $t | gzip > <some_dir>/$t.sql.gz
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment