public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ertan Küçükoglu <[email protected]>
To: Brent Wood <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Restore Windows dump to Linux (locale issue)
Date: Wed, 26 Nov 2025 00:06:39 +0300
Message-ID: <CAH2i4yeY=BYwNaKDJpZKo+eDgwrt2PF3aOkLAGVSJeCW76JOLg@mail.gmail.com> (raw)
In-Reply-To: <SY7P300MB0761D22A982CFDA9052493CCA1D3A@SY7P300MB0761.AUSP300.PROD.OUTLOOK.COM>
References: <CAH2i4yc95fmcbGJ1aOLfmOcjka1crOTCiuuoA30UEFVmj=iqsw@mail.gmail.com>
<[email protected]>
<SY7P300MB0761D22A982CFDA9052493CCA1D3A@SY7P300MB0761.AUSP300.PROD.OUTLOOK.COM>
Brent Wood <[email protected]>, 24 Kas 2025 Pzt, 01:42 tarihinde şunu
yazdı:
> If the dump file is too big to edit conventionally, piping it through a
> stream editor like sed to make the required changes works nicely.
> It can be done on the fly in the restore process if required.
>
> Brent Wood
>
> Principal Technician, Fisheries
> NIWA
> DDI: +64 (4) 3860529
> ------------------------------
> *From:* Tom Lane <[email protected]>
> *Sent:* Monday, 24 November 2025 11:02
> *To:* Ertan Küçükoglu <[email protected]>
> *Cc:* [email protected] <
> [email protected]>
> *Subject:* Re: Restore Windows dump to Linux (locale issue)
>
> =?UTF-8?B?RXJ0YW4gS8O8w6fDvGtvZ2x1?= <[email protected]> writes:
> > I am using PostgreSQL 18.1 on a Windows system.
> > I need to move that database to a Linux system of the same version
> number.
> > Windows system use locales name as tr-TR (this is UTF-8 locale)
> > Linux system use locale name as tr_TR.UTF-8
> > My cluster backup gives error at restore (I think because of that locale
> > naming difference) as below
> > psql:/db.dump:133: ERROR: invalid LC_COLLATE locale name: "tr-TR"
>
> Edit the dump so that the databases are created with Linux-compatible
> locale names. You should find lines like
>
> CREATE DATABASE foo WITH TEMPLATE = template0 ENCODING = 'UTF-8'
> LOCALE_PROVIDER = libc LOCALE = 'tr-TR';
>
> (details will vary depending on PG version) and changing the locale
> strings ought to do the trick.
>
> If the dump file is too big for your editor, consider splitting it
> into schema-only and data-only dumps.
>
> regards, tom lane
>
Hello,
I manually created a database on the Linux system.
Took a database backup and restored it on the Linux system.
This way dump does not include any charset.
Thanks & Regards,
Ertan
view thread (6+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Restore Windows dump to Linux (locale issue)
In-Reply-To: <CAH2i4yeY=BYwNaKDJpZKo+eDgwrt2PF3aOkLAGVSJeCW76JOLg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox