Skip to content

Instantly share code, notes, and snippets.

@orbanbotond
Created March 14, 2013 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orbanbotond/5160018 to your computer and use it in GitHub Desktop.
Save orbanbotond/5160018 to your computer and use it in GitHub Desktop.
Postgress DB migration
ssh -i ~/.ec2/gsg-keypair root@54.244.154.184
pg_dump -a -F c -U search_server search_server_production > db.out
scp -i ~/.ec2/gsg-keypair root@54.244.154.184:/mnt/search_server-production/current/db.out db.out
scp -i ~/.ec2/gsg-keypair db.out root@54.244.133.93:/mnt/search_server_staging-production/current/db.out
pg_restore -a -d search_server_staging_production -U search_server_st db.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment