pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ertan.kucukoglu@1nar.com.tr
To: pgsql-general@lists.postgresql.org
Subject: Cannot restore windows dump on linux
Date: Wed, 19 Oct 2022 18:43:14 +0300
Message-ID: <011701d8e3d1$80a6ba70$81f42f50$@1nar.com.tr> (raw)

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@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

view thread (3+ messages)  latest in thread

Message-ID: <011701d8e3d1$80a6ba70$81f42f50$@1nar.com.tr>
Permalink:  ../011701d8e3d1$80a6ba70$81f42f50$@1nar.com.tr/
Also on:    postgresql.org/message-id/011701d8e3d1$80a6ba70$81f42f50$@1nar.com.tr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ertan.kucukoglu@1nar.com.tr
  Subject: Re: Cannot restore windows dump on linux
  In-Reply-To: <011701d8e3d1$80a6ba70$81f42f50$@1nar.com.tr>
  References: <011701d8e3d1$80a6ba70$81f42f50$@1nar.com.tr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox