LoginSignup
1
0

More than 5 years have passed since last update.

docker execでpg_restoreしたらリストアが失敗する

Posted at

コンテナ外のホストからPostgreSQLのコンテナのバックアップとしてpg_dumpしてたカスタムのアーカイブファイルをpg_restoreしようとしたら [custom archiver] could not read from input file: end of file となってリストアできなかった。

$ docker exec db_1 pg_restore -Fc -c -d db -U user latest.dump
pg_restore: [custom archiver] could not read from input file: end of file

PostgreSQLのコンテナ(db_1)にbashで入って

$ docker exec -it db_1 bash

コンテナ内でpg_restore実行したら成功した

$ pg_restore -Fc -c -d db -U user latest.dump
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0