PostgreSQL: Importing dumps created with newer versions
When importing a dump created on a server that has a more recent
pg_dump version you might get an error like
$ geordi dump staging -l # Sourcing dump into the project_development db pg_restore: [archiver] unsupported version (1.14) in file header x An error occured loading staging.dump
On my machine I had
10.14 which was the most recent package from the standard repository. The server, however, had
The issue could be fixed by installing postgres 12 from the PostgreSQL APT-Repositories. Make sure to only install the client, e.g.
sudo apt install postgresql-client-12. Otherwise another server instance will be installed in parallel.
- psql (client) and postgres server versions do not have to match in order for the import to work. The used server version was