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?
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
psql:c:/Backup/mydbname:321: ERROR: index "adnotacje_id_sprawa_idx" does not exist
psql:c:/Backup/mydbname:1460: ERROR: table "uczestnicy" does not exist
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.