2017-09-14 11 views
2

私はエラーHerokuのDBの展開

! An error occurred and the backup did not finish. 
! 
! pg_restore: [archiver] did not find magic string in file header 
! pg_restore finished with errors 
! waiting for download to complete 
! download finished with errors 
! please check the source URL and ensure it is publicly accessible 
! 
! Run heroku pg:backups:info r006 for more details. 

を受け、時には誤りがある私の最初のHerokuの展開を試みることだし、トラブル

heroku pg:backups:restore "https://s3.us-east-2.amazonaws.com/myusername/POSTGRESQL.dump" 
          DATABASE_URL --app MyAppName 

を持っています:

Starting restore of https://s3.us-east-2.amazonaws.com/talXXXXXXXX to postgresql-XXXXXXXXX... done 

Use Ctrl-C at any time to stop monitoring progress; the ba 
Use heroku pg:backups to check progress. 
Stop a running restore with heroku pg:backups:cancel. 

Restoring... ! 
! An error occurred and the backup did not finish. 
! 
! waiting for restore to complete 
! pg_restore finished with errors 
! waiting for download to complete 
! download finished with errors 
! please check the source URL and ensure it is publicl 
! 
! Run heroku pg:backups:info r015 for more details. 

私はさまざまなブラウザから、URLが公開されており、ファイルをダウンロードできることを確認しました。私はWindowsの推奨URLとして二重引用符を使用していますが、何が間違っていますか?彼らはそれがhttps://devcenter.heroku.com/articles/heroku-postgres-import-export#import

で行うことができます宣伝として

+0

URLを無効なものに変更すると、同じエラーが発生します。だから、公衆のアクセシビリティが問題であるように、URLを適切に解析していない可能性があります。 – talkingtoaj

答えて

0

最後に、私はHerokuのにインポートする方法を考え出すことができなかったので、私は、DBeaverのようなDB接続クライアントを使用するSQLスクリプトに私のDBのダンプを変換し、スクリプトを手動で実行してデータをインポートします。

:(

+0

こんにちは。ダンプファイルをどのように変換し、スクリプトを実行したかについて、より具体的に説明できますか?私は同じ問題に直面しています。 – EGS

0

私は同じ問題に直面していた。それは私がそれを適切に圧縮していませんでした。私のダンプ・ファイルに問題でして回します。

--format=cがある(フォーマット出力としてカスタムを選択し、 -Fcと同じです)デフォルトではファイルを圧縮しますが、それでも十分ではなかったので、--compressフラグも使用しました。

このフラグは圧縮のレベルを示し、0(軽い)から9より重い)

私は念のために、9を使用し、私のコマンドはその

pg_dump --format=c --compress=9 --no-acl --no-owner -h THE_HOST -U YOUR_USER THE_DATABASE > YOUR_FILE.dump 

ように終わるそしてそれは働きました。