Created
April 4, 2015 06:01
-
-
Save jordanhudgens/7c3822fca6723982e685 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this command to create a database backup | |
$ heroku pgbackups:capture | |
# Run this to download the database dump locally | |
$ curl -o latest.dump `heroku pgbackups:url` | |
# Run this to restore the db contents locally (substituting myuser/mydb to match the database.yml file contents) | |
$ 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