Last active
August 29, 2015 14:22
-
-
Save stevenschobert/5bd5964948e3dcee155e to your computer and use it in GitHub Desktop.
Importing data from Heroku PostgeSQL application
This file contains 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 | |
# replace BACKUP_NUM with backup number from above | |
heroku pg:backups public-url BACKUP_NUM | |
# replace URL with step from above | |
curl -o latest.dump URL | |
# replace LOCAL_DB_NAME with local database table | |
# replace DB_USERNAME with db user | |
# replace DB_CONNECTION with db connection | |
pg_restore --verbose --clean --no-acl --no-owner -h DB_CONNECTION -U DB_USERNAME -d LOCAL_DB_NAME latest.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment