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

I usually write about 15 minutes worth of reading per month. I won't transfer your email. No Spam, unsubscribe whenever you want.

As a gift for subscribing, you'll receive an illustrated mini-ebook "How to start a team coding dojo"!

Leave a comment