Skip to content

Instantly share code, notes, and snippets.

@m-mujica
Created June 3, 2013 02:57
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 m-mujica/5695904 to your computer and use it in GitHub Desktop.
Save m-mujica/5695904 to your computer and use it in GitHub Desktop.
Pull heroku database down to local
$ curl -o latest.dump `heroku pgbackups:url -a APPLICATION_NAME`
$ rake db:reset
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U root -d YOUR_LOCAL_DB_NAME latest.dump
$ rm latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment