Pull in Heroku database to local

Asked

Viewed 172 times

2

I need to synchronize my database data in production with what is on my site, is there any way to pull the Heroku database to mine on localhost without having to create a new database locally? My application uses the Mercury editor, meaning the client can change some changes directly in production which means that almost every time I need to synchronize the banks, I didn’t want to have to create a new one every time I need to update my site. The bank used is the postgre

2 answers

0

You can migrate to the database with Active Record to replicate your settings and then make a dump of the data to climb the records.

0


I downloaded the Dashboard itself from Heroku by clicking on Databases you can download a snapshot of the database, the problem is that it comes in .dump. To turn this into a postgre format use the following command:

pg_restore --verbose --clean --no-Acl --no-Owner -h localhost -U userdobanco -d nomedobanco filename.dump

Browser other questions tagged

You are not signed in. Login or sign up in order to post.