Created
August 16, 2012 18:58
-
-
Save leesmith/3372637 to your computer and use it in GitHub Desktop.
Restore heroku pg database to local pg database
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
| # View backups and pick one to pull down | |
| heroku pgbackups | |
| # Download chosen backup | |
| curl -o my_backup.dump `heroku pgbackups:url <backup_num>` | |
| # Restore into local database | |
| pg_restore --verbose --clean --no-acl --no-owner -h myhost -U myuser -d mydb my_backup.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment