Skip to content

Instantly share code, notes, and snippets.

@tobyhede
Created January 20, 2013 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobyhede/4576734 to your computer and use it in GitHub Desktop.
Save tobyhede/4576734 to your computer and use it in GitHub Desktop.
Capture and restore Heroku Database to Local
heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment