Created
September 24, 2012 10:22
-
-
Save happypeter/3775346 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/db-data/; \ | |
mysqldump --extended-insert=FALSE --complete-insert=TRUE -uroot authlove_production>authlove_production.sql; \ | |
mysqldump --extended-insert=FALSE --complete-insert=TRUE -uroot ec_development>ec_development.sql; \ | |
mysqldump --extended-insert=FALSE --complete-insert=TRUE -uroot happycasts_production>happycasts_production.sql; \ | |
git add *.sql | |
git commit -a -m"i"; \ | |
git push;\ | |
' | |
cd ~/repo-farm/db-data/ && git pull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment