Created
November 4, 2014 22:35
-
-
Save qnm/d66d3d634417978a9e6c to your computer and use it in GitHub Desktop.
Restoring Heroku DB to AWS
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
Restoring an Heroku dump to RDS, using an intermediate EC2 box: | |
Using the guide at https://devcenter.heroku.com/articles/heroku-postgres-import-export | |
# curl -o latest.dump `heroku pgbackups:url` | |
# scp -i ~/.ssh/id_rsa latest.dump ec2-user@ec2-xx-xx-xx-xx.ap-southeast-2.compute.amazonaws.com:/tmp/ | |
# ssh -i ~/.ssh/id_rsa latest.dump ec2-user@ec2-xx-xx-xx-xx.ap-southeast-2.compute.amazonaws.com | |
# cd /tmp | |
# pg_restore --verbose --clean --no-acl --no-owner -h $RDS_HOSTNAME -U $RDS_USERNAME -d $RDS_DB_NAME latest.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment