4

Error occured while restoring the PostgreSQL Db

PostgreSQL :- Version : 11 pgAdmin 4

Refer below image

enter image description here

Nam G VU
  • 30,868
  • 67
  • 216
  • 353

1 Answers1

2

In brief

MUST-HAVE pg_restore version on localhost matched with the pg_dump on machine where the backup is created aka backup-site

In full detail

the context

Postgres db backup by pg_dump and restore by pg_restore ref

pg_restore - We want to restore backupfile, ie the .tar file or untar folder of that .tar file, into a local postgres database localdb

pg_dump - The backupfile is created using this tool

the issue

The pg_restore on our local machine may have version NOT MATCHED vs the pg_dump version, which was used when creating the backup file

solution

Install pg_restore on your machine having the SAME VERSION on both local machine and on backup-site

Nam G VU
  • 30,868
  • 67
  • 216
  • 353