简体   繁体   中英

How to restore postgresql db on Heroku

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM