Skip to content

Instantly share code, notes, and snippets.

Created December 7, 2011 00:34
What would you like to do?
Restore Heroku Postgresql db to Engine Yard Cloud (Assuming beta postgres at EY)
# 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