Posted 6 months ago. Visible to the public.

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

Copy
$ 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 psql version 10.14 which was the most recent package from the standard repository. The server, however, had pg_dump version 12.4.

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.

Note:

  • psql (client) and postgres server versions do not have to match in order for the import to work. The used server version was 9.5.
Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Owner of this card:

Avatar
Daniel Straßner
Last edit:
6 months ago
by Emanuel De
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Daniel Straßner to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more