Created
June 10, 2011 17:20
-
-
Save markysharky70/1019289 to your computer and use it in GitHub Desktop.
Copy your production database to your staging database hosted on Heroku
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
1) backup production database: | |
heroku pgbackups:capture --expire --remote production | |
2) obtain url string to backup from step 1: | |
heroku pgbackups:url --app production_app_name --remote production_app_branch_name | |
3) transfer backup from production to staging app: | |
heroku pgbackups:restore DATABASE 'production_app_backup_url_string_from_step_2' --app production_app_name --app staging_app_branch_name |
in step 3, I think you meant staging_app_name instead of production_app_name
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also: https://gist.github.com/1095522 (from http://stackoverflow.com/questions/6930624/how-can-i-make-my-staging-and-production-have-the-same-data-heroku)