Skip to content

Instantly share code, notes, and snippets.

@rafaelgonzalez
Last active February 14, 2018 04:36
Show Gist options
  • Save rafaelgonzalez/a13bd9b17c751d3961bb to your computer and use it in GitHub Desktop.
Save rafaelgonzalez/a13bd9b17c751d3961bb to your computer and use it in GitHub Desktop.
heroku pg:backups:capture -a YOUR_APP
curl -o latest.dump `heroku pg:backups:url -a YOUR_APP`
bundle exec rake db:drop
bundle exec rake db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d YOUR_DEV_DB latest.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment