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

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


ubuntu guys: most likely your pg_restore is outdated. Just use postgres doc and install newest version of postgres:

  1. Create the file /etc/apt/sources.list.d/pgdg.list and add a line for the repository: deb http://apt.postgresql.org/pub/repos/apt/ YOUR_UBUNTU_VERSION_HERE-pgdg main where ubuntu versions are:

    • 20.04 - focal
    • 18.04 - bionic
    • 16.04 - xenial
  2. Add keys: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

  3. sudo apt-get update && sudo apt-get upgrade

It worked for me!


Here's another twist, but please note first that this is a windows case.If it's just linux for you, don't read further.All advice given here did not help me, eventually the cause IMC was simpler and had to do with the use of pgAdmin. Because of the repetitive nag for newer versions, my habit is to install pgAdmin separately (not using stackbuilder).(AT LEAST) in that case, pgAdmin has its own cache of utility programs and will use these unless you tell it differently. My pg instances are still version 11(.6), but the latest pgAdmin will probably have V12 utilities. Which may quite well cause a version discrepancy.This crept up on me after doing a number of succesful transfers from my main machine to a laptop. So, in pgAdmin do (menu)File->preferences->Paths and set Binary Paths corresponding to your postgres installation, IMC C:\Program Files\PostgreSQL\11\bin.That did the job.


So my experience here was somewhat similar to OP, but not completely.

I had versions 9.4, 9.5, 11, and 12 installed, and all the pg_* tools pointed to the 9.4 version. I tried to pg_restore a dump create by version 12 on a different host, which didn't work because this host used the 9.4 tools, which were incompatible (same error as OP posted).

So, here was my debugging flow:

  • which pg_restore
    • /usr/bin/pg_restore
  • ls -l /usr/bin/pg_restore
    • /usr/bin/pg_restore -> ../share/postgresql-common/pg_wrapper
  • vim /usr/share/postgresql-common/pg_wrapper
    • Read about how it determines version. Just read through the first 20 or so lines

Apparantly, there is a --cluster option, which is helpful in resolving the version. So I simply added --cluster 12/mainto my pg_restore call, and everything works as expected again