Restore Heroku Postgres Database Locally
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
--app <appname>to specify which app to backup. By default, backup operates against primary database, identified by the
DATABASE_URLconfig 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 file is download to current file. You can use it to retore to your local postgre database.