Restore Heroku Postgres Database Locally
Contents
It would be nice to operate against the same set of data on your local machine with your heroku postgres server. Heroku made this a breeze.
Create a new backup on heroku
|
|
Note
Use
--app <appname>
to specify which app to backup.
By default, backup operates against primary database, identified by the DATABASE_URL
config var.
Append database name in the end to choose which database to backup.Download backup file
Use following command to download latest backup file. The default name is latest.dump
.
|
|
Restore backup
Once latest.dump
file is download to current file. You can use it to retore to your local postgre database.
|
|