Skip to content

Instantly share code, notes, and snippets.

@AndySze
Forked from happypeter/db_backup.sh
Created January 9, 2013 02:49
Show Gist options
  • Save AndySze/4490128 to your computer and use it in GitHub Desktop.
Save AndySze/4490128 to your computer and use it in GitHub Desktop.
#!/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