0

開発環境で heroku の pg_dump を使用しようとしています。

ダンプをダウンロードしたら、pg_restore を使用して実行できるようです: http://www.postgresql.org/docs/current/static/app-pgrestore.html

ユーティリティを正しく使用できません。ここで誰かが助けてくれるかもしれません

これは私が使用しているコマンドです:

➜  myapp git:(master) ✗ pg_restore --dbname=myapp_development ~/Downloads/2013-12-27-06-04-23.dump

多数のスキーマが既に存在します、ロールが存在しないというエラーが発生します。

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 181; 1259 4558648 TABLE authentications hsddtzyenpyiuasdu
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "authentications" already exists


ERROR:  relation "authentications_id_seq" already exists

pg_restore: [archiver (db)] could not execute query: ERROR:  role "hsddtzyenpyiuasdu" does not exist

これを行うためのより簡単でクリーンな方法があるに違いありません。誰かが開発中に prod heroku pg db を使用できるようにするための手順とコマンドのリストを提供していただければ幸いです。

PS: データとスキーマの量が非常に少ない (ダンプ: 6MB)

4

1 に答える 1