pg_restore: [archiver] unsupported version (1.13) in file header

14.2k Views Asked by At
C:\Program Files (x86)\pgAdmin III\1.22\pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "randd" --role "postgres" --no-password  --verbose "C:\Users\ranjeet\Desktop\RandDbackup19-3final.backup"

pg_restore: [archiver] unsupported version (1.13) in file header

2

There are 2 best solutions below

2
On

This error means that you are using an old and outdated version of pg_restore (and hence PostgreSQL) on the client side. The dump was created by a more recent release of PostgreSQL that the one installed, so your pg_restore does not know how to handle it.

Archive version 1.13 was introduced by commit 3d2aed664ee8271fd6c721ed0aa10168cda112ea in February 2018. It has been available since the point releases 10.3, 9.6.8, 9.5.12, 9.4.17 and 9.3.22.

You should upgrade your PostgreSQL installation, particularly because this release and this patch contain security relevant bug fixes.

0
On

No need to upgrade to the latest Postgres version.

We can backup and restore from any Postgres version to any as follows.

Create a backup in plain SQL format using pg_dump as follows in local/dev machine

pg_dump -U postgres -W -F p test > test.sql

Then use psql to restore dump on remote machine

psql -U postgres -W -d test -f test.sql

It works, on windows as well as Linux environments.

Please note if you see an error message while restoring on the remote machine like 'ERROR: unrecognized configuration parameter "default_table_access_method"'. You can simply ignore this message, as "default_table_access_method" option is introduced in Postgres 12 and while taking backedup added in sql file.