Logo
BEAUTY IN SIMPLE

Digital Garden

A collection of short solutions to daily tech problems, notes, some thoughts and explorations that might convert into a blog post someday. My take on Learn in public concept.

title: "Heroku"

Heroku

  1. Export database from Heroku
  2. Restore dump to local database

Export database from Heroku

  • Create backup
heroku pg:backups:capture --app <heroku_app_name>
  • Download backup
heroku pg:backups:download --app <heroku_app_name>

Restore dump to local database

pg_restore --verbose --clean --no-acl --no-owner -h localhost -U <postgres_username> -d <database> latest.dump