Heroku の dump file のフォーマットが変わって, 古い pg_restore
の バージョンがサポートされなくなった。
If you are using an old version of pg_restore, you may see an error such as pg_restore: [archiver] unsupported version (1.13) in file header when you try to run pg_restore. Please make sure that you are using pg_restore version 10.3, 9.6.8, 9.5.12, 9.4.17, and 9.3.22 or up. You can check the version of your pg_restore by running pg_restore --version.
とのこと。
バージョンのチェックは以下の様にして行う。
$ pg_restore --version
pg_restore (PostgreSQL) 9.3.5
入れたつもりもないのに pg_restore
が使える PHPer の人は、 OSX 用の PHP のバイナリに付属しているものを使っているのかも知れない。
$ type pg_restore
pg_restore is hashed (/usr/local/php5/bin/pg_restore)
Mac で Postgresを使っている人で、 Postgres.app
を導入している人は、 /Applications/Postgres.app/Contents/Versions/latest/bin/pg_restore
を使うと良い。
$ /Applications/Postgres.app/Contents/Versions/latest/bin/pg_restore --version
pg_restore (PostgreSQL) 10.3
現時点最新の 2.1.3 バージョンで 上記のように 10.3 バージョンが利用可能