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

Поиск
Список
Период
Сортировка
От Paul Förster
Тема Re: How to move a 11.4 cluster to another Linux host, but empty?
Дата
Msg-id D880DDEF-E279-4D27-BF3D-AB231FBBA69C@gmail.com
обсуждение исходный текст
Ответ на Re: How to move a 11.4 cluster to another Linux host, but empty?  (Matthias Apitz <guru@unixarea.de>)
Список pgsql-general
Hi Matthias,

> On 02. May, 2020, at 16:30, Matthias Apitz <guru@unixarea.de> 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.
>
> As I said from the beginning: moving the cluster but without the
> databases in it.

you don't want to move the database cluster in this case!

Add the database cluster's config files postgresql.conf, pg_hba.conf, pg_ident.conf or whatever to the tar file. Then,
onthe new host, do an initdb and after that, copy the old config files into the new PGDATA. Then start the new (empty
andfree of databases) database cluster. 

So:
tar cvf /tmp/postgresql11.tar /usr/local/sisis-pap/pgsql /data/postgresql11/*.conf

Cheers,
Paul


В списке pgsql-general по дате отправления:

Предыдущее
От: Matthias Apitz
Дата:
Сообщение: Re: How to move a 11.4 cluster to another Linux host, but empty?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: How to move a 11.4 cluster to another Linux host, but empty?