Skip to content

Instantly share code, notes, and snippets.

@panchicore
Created April 15, 2016 14:19
Show Gist options
  • Save panchicore/e01d271b5afe3cc69db9d4d8c6de8101 to your computer and use it in GitHub Desktop.
Save panchicore/e01d271b5afe3cc69db9d4d8c6de8101 to your computer and use it in GitHub Desktop.
Export from heroku and import to localhost
# install postgres. install heroku and run "heroku login".
heroku pg:backups capture --app appname
curl -o latest.dump `heroku pg:backups public-url --app appname`
createdb dbname
pg_restore --verbose --clean --no-acl --no-owner -d dbname latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment