From: Paul Förster <paul.foerster@gmail.com>
To: Matthias Apitz <guru@unixarea.de>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: How to move a 11.4 cluster to another Linux host, but empty?
Date: Sat, 2 May 2020 16:37:17 +0200
Message-ID: <D880DDEF-E279-4D27-BF3D-AB231FBBA69C@gmail.com> (raw)
In-Reply-To: <20200502143031.GA16477@c720-r342378>
References: <20200501081029.GA3261@c720-r342378>
<999AE92C-F74D-4399-8FE1-1DB80D08915D@gmail.com>
<20200501083148.GA3595@c720-r342378>
<20200502102329.GA14178@c720-r342378>
<6DC33DF2-120E-4EA7-B764-F1770EB66EE9@gmail.com>
<20200502143031.GA16477@c720-r342378>
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, on the new host, do an initdb and after that, copy the old config files into the new PGDATA. Then start the new (empty and free of databases) database cluster.
So:
tar cvf /tmp/postgresql11.tar /usr/local/sisis-pap/pgsql /data/postgresql11/*.conf
Cheers,
Paul
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: paul.foerster@gmail.com, guru@unixarea.de
Subject: Re: How to move a 11.4 cluster to another Linux host, but empty?
In-Reply-To: <D880DDEF-E279-4D27-BF3D-AB231FBBA69C@gmail.com>
References: <20200501081029.GA3261@c720-r342378> <999AE92C-F74D-4399-8FE1-1DB80D08915D@gmail.com> <20200501083148.GA3595@c720-r342378> <20200502102329.GA14178@c720-r342378> <6DC33DF2-120E-4EA7-B764-F1770EB66EE9@gmail.com> <20200502143031.GA16477@c720-r342378> <D880DDEF-E279-4D27-BF3D-AB231FBBA69C@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox