Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olC8z-0004xm-QL for pgsql-general@arkaria.postgresql.org; Wed, 19 Oct 2022 16:42:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1olC8y-0003vu-Mx for pgsql-general@arkaria.postgresql.org; Wed, 19 Oct 2022 16:42:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olC8y-0003vh-D2 for pgsql-general@lists.postgresql.org; Wed, 19 Oct 2022 16:42:12 +0000 Received: from mta13.2.doruk.net.tr ([81.21.172.171] helo=mta13.doruk.net.tr) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olC8w-0008Mm-4G for pgsql-general@lists.postgresql.org; Wed, 19 Oct 2022 16:42:12 +0000 Received: from cmail19.webkontrol.doruk.net.tr ([212.58.6.99]:56723) by mta13.doruk.net.tr with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olC8s-000DrQ-BE for pgsql-general@lists.postgresql.org; Wed, 19 Oct 2022 19:42:06 +0300 Received: from DESKTOPQCEPGF2 ([176.88.190.218]) by cmail19.webkontrol.doruk.net.tr (12.2.1 build 1 ) with ASMTP id 202210191942035570 for ; Wed, 19 Oct 2022 19:42:03 +0300 From: To: References: <011701d8e3d1$80a6ba70$81f42f50$@1nar.com.tr> In-Reply-To: <011701d8e3d1$80a6ba70$81f42f50$@1nar.com.tr> Subject: RE: Cannot restore windows dump on linux Date: Wed, 19 Oct 2022 19:42:08 +0300 Message-ID: <012801d8e3d9$baa6eda0$2ff4c8e0$@1nar.com.tr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIXuAv/V7tfLtF1fipbR8FGAZQQ+62YQV6A Content-Language: en-us List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.kucukoglu@1nar.com.tr =20 Sent: Wednesday, October 19, 2022 18:43 To: pgsql-general@lists.postgresql.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:=A0 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@app:/home/ek# psql -v ON_ERROR_STOP=3D1 -U myuser -d mydb < last_backup.bak SET SET SET SET SET set_config ------------ (1 sat=FDr) SET SET SET SET ERROR:=A0 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