Created
June 27, 2012 12:04
-
-
Save happypeter/3003659 to your computer and use it in GitHub Desktop.
db backup with git
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
#!/usr/bin/env bash | |
ssh linode 'cd local_clone; cd happynewsdb; \ | |
mysqldump --extended-insert=FALSE --complete-insert=TRUE -uroot authlove_development>authlove_development.sql; \ | |
git commit -a -m"i"; \ | |
git push;\ | |
cd ../happyecdb/ ; \ | |
mysqldump --extended-insert=FALSE --complete-insert=TRUE -uroot ec_development>ec_development.sql; \ | |
git commit -a -m"i"; \ | |
git push;\ | |
cd ../happycastsdb/ ; \ | |
mysqldump --extended-insert=FALSE --complete-insert=TRUE -uroot happycasts_production>happycasts_production.sql; \ | |
git commit -a -m"i"; \ | |
git push;\ | |
' | |
cd happycastsdb/; git pull; cd ../happyecdb/; git pull; cd ../happynewsdb/; git pull; | |
echo game over! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment