0

I had to switch from PostgreSQL 9.4 on Linux to PostgreSQL 13 on Windows

Normal restore was not successful.

Can somebody share experience with such case?

EDIT 1:

On linux I use:

pg_dump -c -O -U postgres mydbname -h localhost -p 5432 --disable-dollar-quoting -i | gzip > /backup/mydbname.gz

on windows I use 7zip to unpack gz file and then the problem is that restoring with

psql.exe -U postgres -f c:\Backup\mydbname

I get such errors:

psql:c:/Backup/mydbname:65: ERROR:  relation "public.sprawy" does not exist

or:

psql:c:/Backup/mydbname:321: ERROR:  index "adnotacje_id_sprawa_idx" does not exist

or:

psql:c:/Backup/mydbname:1460: ERROR:  table "uczestnicy" does not exist

or:

psql:c:/Backup/mydbname:1461: ERROR:  sequence "uczestnicy_seq" does not exist

of course the CRM aplication after trying to connect to new server throws errors because restoring was not well, thus we still stay on old installation.

3
  • 3
    Please edit your question and show us the complete pg_dump and pg_restore commands you used include the complete and exact error message. Formatted text please, no screen shots
    – user1822
    Dec 23, 2022 at 13:34
  • 2
    I can absolutely share my experience: using pg_dump and pg_restore works just fine.
    – user1822
    Dec 23, 2022 at 13:35
  • @a_horse_with_no_name I just edited my question please take a look again. Dec 26, 2022 at 0:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.