Re: How to move a 11.4 cluster to another Linux host, but empty? - Mailing list pgsql-general

From Paul Förster
Subject Re: How to move a 11.4 cluster to another Linux host, but empty?
Date
Msg-id 6DC33DF2-120E-4EA7-B764-F1770EB66EE9@gmail.com
Whole thread Raw
In response to Re: How to move a 11.4 cluster to another Linux host, but empty?  (Matthias Apitz <guru@unixarea.de>)
Responses Re: How to move a 11.4 cluster to another Linux host, but empty?  (Matthias Apitz <guru@unixarea.de>)
List pgsql-general
Hi Matthias,

> On 02. May, 2020, at 12:23, Matthias Apitz <guru@unixarea.de> wrote:
> $ /usr/local/sisis-pap/pgsql/bin/pg_ctl -D /data/prosgresql11/data initdb

I don't get it. Is the setup now as follows

/data/postgresql11       <= software with bin, lib64, share, etc...
/data/postgresql11/data  <= PGDATA

or

/usr/local/sisis-pap/pgsql  <= software with bin, lib64, share, etc...
/data/postgresql11/data     <= PGDATA

?

In the first case, your tar command would be:
tar cvf /tmp/postgresql11.tar --exclude=/data/postgresql11/data /data/postgresql11

Note that the --exclude option must appear BEFORE the directory tree to archive in the command line! => man tar

In the second case, your tar command would be:
tar cvf /tmp/postgresql11.tar /usr/local/sisis-pap/pgsql

to package the software only without the database.

Cheers,
Paul


pgsql-general by date:

Previous
From: Matthias Apitz
Date:
Subject: Re: How to move a 11.4 cluster to another Linux host, but empty?
Next
From: Matthias Apitz
Date:
Subject: Re: How to move a 11.4 cluster to another Linux host, but empty?