Created
June 10, 2014 19:35
-
-
Save Sacristan/27ae5468df425518f94c to your computer and use it in GitHub Desktop.
This file contains 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
DB -> Local | |
ssh [email protected] | |
pg_dump --format=c -h localhost --username norden nordenhealth > latest.dump | |
scp [email protected]:/home/deployer/latest.dump ~/Desktop/ | |
source ~/.bashrc && rake db:drop && rake db:create && pg_restore --verbose --clean --no-acl --no-owner -h localhost -U sac -d nordenhealth_development ~/Desktop/latest.dump | |
rake db:migrate RAILS_ENV=test && rake db:seed RAILS_ENV=test | |
Local -> DB | |
source ~/.bashrc && pg_dump --format=c -h localhost --username sac nordenhealth_development > ~/Desktop/t_latest.dump | |
scp ~/Desktop/t_latest.dump [email protected]:/home/deployer/t_latest.dump | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U norden -d nordenhealth t_latest.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment