Skip to content

Instantly share code, notes, and snippets.

@danieljohnmorris
Forked from markysharky70/gist:1019289
Created December 5, 2013 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danieljohnmorris/7802482 to your computer and use it in GitHub Desktop.
Save danieljohnmorris/7802482 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment