Re: How to move a 11.4 cluster to another Linux host, but empty?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Matthias Apitz <guru(at)unixarea(dot)de>
Cc: Paul Förster <paul(dot)foerster(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to move a 11.4 cluster to another Linux host, but empty?
Date: 2020-05-02 19:19:48
Message-ID: d09ab931-5540-f6fd-ad46-0e52ca17488a@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/2/20 11:58 AM, Matthias Apitz wrote:
> El día sábado, mayo 02, 2020 a las 08:23:52a. m. -0700, Adrian Klaver escribió:
>
>> On 5/2/20 8:02 AM, Paul Förster wrote:
>>> Hi Adrian,
>>>
>>>> On 02. May, 2020, at 16:59, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>>>> 2) To create a new base/ you will need to initdb data/ and that is not possible as initdb will not work on a populated data/.
>>>
>>> you do the initdb and then copy the *.conf files from the tar over the newly created ones. After that, launch the cluster.
>>
>> Yeah I know, I do that on a fairly regular basis. The intent was to let
>> the OP know that ripping base/ out of cluster and transplanting a new
>> one in is not possible.
>
> OK, lesson learned: Next time I will do a tar backup of PGDATA after
> the configuration of the cluster and before creating any database in it.

As Paul said this is probably more then you want to do. If for no other
reason then that the env(in particular locale) where you untar the
PGDATA may be different from where you tar(ed) it. This will leave you
with cluster that is out of sync with its environment.

>
> Thanks
>
> matthias
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message TalGloz 2020-05-02 19:28:07 Compiling C Extension Functions against PostgreSQL 12
Previous Message Paul Förster 2020-05-02 19:10:06 Re: How to move a 11.4 cluster to another Linux host, but empty?