1

I'm totally new to Heroku and Postgres and I'm trying to figure out how to restore and access the Postgres db in Heroku. I do have backup that taken fro pgAdmin III .backup file.

Any help with how to restore the Postgres db in Heroku would be greatly appreciated.

1

1 Answer 1

2

Restore to local database

Load the dump into your local database using the pg_restore tool. If objects exist in a local copy of the database already, you might run into inconsistencies when doing a pg_restore. Pg_restore does not drop all of the objects in the database when loading the dump. This will usually generate some warnings, due to differences between your Heroku database and a local database, but they are generally safe to ignore.

$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump

Sign up to request clarification or add additional context in comments.

1 Comment

i have .backup not dump, how would i create dump?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.