How to copy a database from an heroku app to another

less than 1 minute read

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 :

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

Comments