How to Copy a Database From an Heroku App to Another

For mes-courses.fr, I am using another heroku app as “integration” app, where I can do late verifications before deploying to my production app. If you don’t already do this, I recommend you to start now !

One thing that I needed was to copy data from my production app to my integration app. It turns out that heroku makes this very easy :

1
heroku pgbackups:restore DATABASE `heroku pgbackups:url --app my-app-prod` --app my-app-integ --confirm my-app-integ

Comments