Skip to content

Instantly share code, notes, and snippets.

@jwright
Created June 9, 2015 19:06
Show Gist options
  • Save jwright/3a8587ec7e97da587d6e to your computer and use it in GitHub Desktop.
Save jwright/3a8587ec7e97da587d6e to your computer and use it in GitHub Desktop.
Copy database from production to staging on Heroku
git remote add staging git@heroku.com:my-staging-app.git
git remote add production git@heroku.com:my-production-app.git
heroku pg:backups restore `heroku pg:backups public-url --remote production | cat` DATABASE --remote staging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment