How To Back Up A Heroku Production Database To Staging

Dan Croak

Configure staging and production Git remotes to point to Heroku applications:

heroku git:remote -r staging -a your-staging-app
heroku git:remote -r production -a your-production-app

Install Parity. On MacOS, install via Homebrew:

brew tap thoughtbot/formulae
brew install parity

On other operating systems:

gem install parity

Create a database backup at any time:

production backup

Restore a production database backup into staging environment:

staging restore production

Restore a production database backup into local development environment:

development restore production

About thoughtbot

We've been helping engineering teams deliver exceptional products for over 20 years. Our designers, developers, and product managers work closely with teams to solve your toughest software challenges through collaborative design and development. Learn more about us.