Skip to content

Instantly share code, notes, and snippets.

@wookiecooking
Created June 18, 2015 22:59
Show Gist options
  • Save wookiecooking/27110ac2984ee19f137c to your computer and use it in GitHub Desktop.
Save wookiecooking/27110ac2984ee19f137c to your computer and use it in GitHub Desktop.
Dumps
#!/bin/bash
username='someusername'
password='somepassword'
database='somedatabase'
host='somehost'
for x in `mysql --skip-column-names -u $username -p$password $database -h $host -e 'show tables;'`; do
mysqldump -u [username] -p[password] [db name] $x > "$x.sql"
sleep 30
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment