"Unsupported version" error restoring a schema backed up with the same version it was dumped
1
vote
1
answer
8067
views
I am trying to backup and restore a schema from a remote server to a local system. Even though
pg_dump
and pg_restore
report the same version, the later fails with the familiar "Unsupported version" error (log below). I have seen this error before, when pg_restore
is an older version than pg_dump
, but never when the versions match. What could be the cause?
$ psql -h server.somewhere -p 5432 -U user -d database
Password for user user:
psql (16.1 (Ubuntu 16.1-1.pgdg22.04+1), server 14.10)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.
database=> SELECT version();
version
----------------------------------------------------------------------------------------------------------
PostgreSQL 14.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20), 64-bit
(1 row)
database=> \q
$ pg_dump --version
pg_dump (PostgreSQL) 14.10 (Ubuntu 14.10-1.pgdg22.04+1)
$ pg_restore --version
pg_restore (PostgreSQL) 14.10 (Ubuntu 14.10-1.pgdg22.04+1)
$ pg_dump -h server.somewhere -p 5432 -U user database -n schema_new -F t > ~/temp/schema_new_2024-01-29.backup
$ pg_restore -d wosis ~/temp/schema_new_2024-01-29.backup
pg_restore: error: unsupported version (1.15) in file header
Asked by Luís de Sousa
(674 rep)
Jan 29, 2024, 01:49 PM
Last activity: Jan 30, 2024, 05:40 PM
Last activity: Jan 30, 2024, 05:40 PM