Created
June 11, 2015 15:19
-
-
Save jeffreyjurgajtis/a731b9c779656309c06c to your computer and use it in GitHub Desktop.
Heroku Postgres DB to local Postgres DB
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
Details: | |
https://devcenter.heroku.com/articles/heroku-postgres-backups | |
$ heroku pg:backups capture #=> <backup_number> | |
$ heroku pg:backups public-url <backup_number> #=> <backup_url> | |
$ curl -o latest.dump <backup_url> | |
(drop and re-create local database) | |
$ 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