Reputation: 3705
I have a rails app deployed on heroku with postgres db.
My goal is to get a copy of the db to my local machine. So, I followed the 3-liner instruction: https://devcenter.heroku.com/articles/heroku-postgres-import-export#export
There were errors in my localhost app, and I traced the problem to be that pg_restore
didnt fill one of the tables, while rest of the table is filled
Question is:
EDIT:
looks like this is behaving nicely (and solves my problem):
rake db:drop db:create
then pg_restore db.dump
but this is not: rake db:drop db:create db:migrate
then pg_restore db.dump
Upvotes: 0
Views: 509
Reputation: 5190
In order to check if it's a heroku bug or not try to backup/restore using psql
:
pg_dump -o -h host -U user -d database -n "\"SCHEMA\"" > test.dump
psql -U user database < test.dump
If you have all tables presented it means it's better to log a case with heroku support.
Upvotes: 1