Export database dump from Heroku and import to local database
Go the your Heroku dasboard and click to the Resources
Under Add-ons, click to your database (yours can be different: `Heroku
Postgres::Orange`
Within the newly opened tab, you should see the Capture Backup. Click it
and wait couple of seconds for Heroku to create your back-up
When the back-up creation is completed, click to the Download button
Move the file to the project's directory
Rename file to the day you downloaded the database from Heroku:
yyyy-mm-dd.dump
Open terminal and run the command below after making required the changes:
`pg_restore --verbose --clean --no-acl --no-owner -h localhost -U ogirginc
-d chitter_dev 2017-05-03.dump`:
First; change
ogirginc
to your computer's username,Second;
chitter_dev
to your application's database,Third;
2017-05-03.dump
to the day you downloaded the database fromHeroku
Last updated
Was this helpful?