From: | <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr> |
---|---|
To: | <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Cannot restore windows dump on linux |
Date: | 2022-10-19 16:42:08 |
Message-ID: | 012801d8e3d9$baa6eda0$2ff4c8e0$@1nar.com.tr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello again,
While I was searching for a solution, I saw an example of manual running of
dump file within psql. Tried this and it did work just fine.
\connect mydb
\i last_backup.bak
Above two commands completed without any loading error at all.
Now I wonder why command line did not work.
Do let me know if there is a known reason, please.
Thanks & Regards,
Ertan
-----
From: ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr <ertan(dot)kucukoglu(at)1nar(dot)com(dot)tr>
Sent: Wednesday, October 19, 2022 18:43
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Cannot restore windows dump on linux
Hello,
I am using PostgreSQL 14.5
I tried to move a Linux database to Windows. Both identical version.
Linux dump successfully loaded on Windows system.
Reason for changing system didn't work out and now I am trying to move it
back because it has some modifications.
I just dumped a database backup on windows to a dump file. I see dump file
contains "\r\n" as new line identifier (hence windows dump). Just to
clarify, this is not \N character I am mixing.
When I try to restore windows dump on regular Linux system, I get a lot of
errors and it stops at this one below where this is a pure data load
position.
ERROR: syntax error at or near "43589"
LINE 1: 43589 7102e523-f401-4cce-852d-e537f863886f.
I also tried to stop at first error when restoring, in this case it stops at
below error
root(at)app:/home/ek# psql -v ON_ERROR_STOP=1 -U myuser -d mydb <
last_backup.bak
SET
SET
SET
SET
SET
set_config
------------
(1 satır)
SET
SET
SET
SET
ERROR: index "ix_xrates_date" does not exist
I searched the internet and I could not solve my problem.
How can I successfully dump on Widnows and restore on Linux?
Any help is appreciated.
Thanks & Regards,
Ertan
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Raynsford | 2022-10-19 17:32:25 | Column value derived from generated column in INSERT? |
Previous Message | ertan.kucukoglu | 2022-10-19 15:43:14 | Cannot restore windows dump on linux |