Last active
October 15, 2019 17:05
-
-
Save diligasi/0c2df7cfe14e2dccf60fc44fda2d5da9 to your computer and use it in GitHub Desktop.
Generates a dump file from Heroku database, download it and restore locally
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
heroku pg:backups capture | |
heroku pg:backups public-url | |
curl "http://[url]" > production.dump | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb file.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment