Skip to content

Instantly share code, notes, and snippets.

@jessieay
Created November 15, 2013 18:25
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 jessieay/7489216 to your computer and use it in GitHub Desktop.
Save jessieay/7489216 to your computer and use it in GitHub Desktop.
Restoring local database from Heroku
$ heroku pgbackups:capture --expire --app APP_NAME
$ curl -o latest.dump `heroku pgbackups:url --app APP_NAME`
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -d DEVELOPMENT_DATABASE_NAME latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment