Skip to content

Instantly share code, notes, and snippets.

@harley
Created July 8, 2012 22:45
Show Gist options
  • Save harley/3073288 to your computer and use it in GitHub Desktop.
Save harley/3073288 to your computer and use it in GitHub Desktop.
clone database from production to staging
# remote repo aliases assumed:
# git remote add production production_heroku_app_git_repo
# git remote add staging staging_heroku_app_git_repo
# add addons if not already
# heroku addons:add pgbackups --remote staging
# heroku addons:add pgbackups --remote production
heroku pgbackups:capture --remote production
heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging
@sherwinyu
Copy link

woooooooo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment