-
-
Save Randommood/1733516 to your computer and use it in GitHub Desktop.
Restore Heroku Postgresql db to Engine Yard Cloud (Assuming beta postgres at EY)
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
# On Heroku | |
# Create dump file | |
heroku pgbackups:capture --app <application_name> | |
# On Engine Yard slice | |
# Get dump file from heroku | |
curl -o latest.dump `heroku pgbackups:url b005 --app <application_name> -e <environment>` | |
# drop and recreate database | |
bundle exec rake db:drop | |
bundle exec rake db:create | |
# Restore db | |
pg_restore --verbose --clean --no-acl --no-owner -U deploy -d <database_name> ~/latest.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment