Skip to content

Instantly share code, notes, and snippets.

@fabianvelizok
Created April 7, 2015 16:45
Show Gist options
  • Save fabianvelizok/c1a6a613cc53ef6111ba to your computer and use it in GitHub Desktop.
Save fabianvelizok/c1a6a613cc53ef6111ba to your computer and use it in GitHub Desktop.
Get the Heroku db
Get the Heroku db as detailed here:
heroku pgbackups:capture --expire --remote your_remote_repository
curl -o latest.dump `heroku pgbackups:url --remote your_remote_repository`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U user -d database latest.dump
rm latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment