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>, Paul Förster <paul(dot)foerster(at)gmail(dot)com>
Cc: 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 14:59:50
Message-ID: 48137a5a-3bfe-500d-0d8a-7dc96b12ac37@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/2/20 7:30 AM, Matthias Apitz wrote:
> El día sábado, mayo 02, 2020 a las 03:23:52p. m. +0200, Paul Förster escribió:
>
>> /usr/local/sisis-pap/pgsql <= software with bin, lib64, share, etc...
>> /data/postgresql11/data <= PGDATA
>
> Exactly, his is the setup above.
>
> I will move /usr/local/sisis-pap/pgsql by tar; and I want to move some parts(!)
> of the cluster /data/postgresql11/data (configuration etc.), but not the databases
> included in /data/postgresql11/data, like the cluster(!) in PGDATA was before having
> created any database(!) in it.

That won't work for the following reasons:

1) A lot of the files/dirs included in /data/postgresql11/data are
specific to the files in /data/postgresql11/data/base as they where
created over time. They will fail when you try to merge them with new
data. More importantly see 2) below.

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/.

>
> As I said from the beginning: moving the cluster but without the
> databases in it.
>
> Thanks
>
> matthias
>

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Förster 2020-05-02 15:02:17 Re: How to move a 11.4 cluster to another Linux host, but empty?
Previous Message Paul Förster 2020-05-02 14:37:17 Re: How to move a 11.4 cluster to another Linux host, but empty?