Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUpJ4-00053g-Q1 for pgsql-general@arkaria.postgresql.org; Sat, 02 May 2020 10:23:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jUpJ1-0006t3-Lr for pgsql-general@arkaria.postgresql.org; Sat, 02 May 2020 10:23:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUpJ1-0006sv-Dh for pgsql-general@lists.postgresql.org; Sat, 02 May 2020 10:23:35 +0000 Received: from ms-10.1blu.de ([178.254.4.101]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jUpIy-0007LA-E4 for pgsql-general@lists.postgresql.org; Sat, 02 May 2020 10:23:34 +0000 Received: from [188.174.50.249] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1jUpIw-0001rB-V2; Sat, 02 May 2020 12:23:31 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id 042ANUL3014249 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 2 May 2020 12:23:30 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id 042ANTRn014248; Sat, 2 May 2020 12:23:29 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sat, 2 May 2020 12:23:29 +0200 From: Matthias Apitz To: Paul =?utf-8?Q?F=C3=B6rster?= , pgsql-general@lists.postgresql.org Subject: Re: How to move a 11.4 cluster to another Linux host, but empty? Message-ID: <20200502102329.GA14178@c720-r342378> Reply-To: Matthias Apitz References: <20200501081029.GA3261@c720-r342378> <999AE92C-F74D-4399-8FE1-1DB80D08915D@gmail.com> <20200501083148.GA3595@c720-r342378> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200501083148.GA3595@c720-r342378> X-Operating-System: FreeBSD 13.0-CURRENT r342378 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.11.1 (2018-12-01) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 188.174.50.249 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk El día viernes, mayo 01, 2020 a las 10:31:48a. m. +0200, Matthias Apitz escribió: > Hi Paul, > > El día viernes, mayo 01, 2020 a las 10:23:37a. m. +0200, Paul Förster escribió: > > > > > you may have a look at the tar man page. tar in Linux has the --exclude=PATTERN option. > > I do know the man page(s) of tar ant the --exclude=PATTERN. > > > You may specify the PGDATA directory there. > > This is, what I wanted to know: that the cluster can be moved without > the PGDATA dir and still works fine. > This will not work! The cluster was created with: $ /usr/local/sisis-pap/pgsql/bin/pg_ctl -D /data/prosgresql11/data initdb and consequently, PGDATA is /data/prosgresql11/data. This directory contains a lot of subirs and config files: srap32dxr1:/home/sisis/guru # du -s /data/postgresql11/data/* | sort -n 4 /data/postgresql11/data/PG_VERSION 4 /data/postgresql11/data/pg_commit_ts 4 /data/postgresql11/data/pg_dynshmem 4 /data/postgresql11/data/pg_ident.conf 4 /data/postgresql11/data/pg_replslot 4 /data/postgresql11/data/pg_serial 4 /data/postgresql11/data/pg_snapshots 4 /data/postgresql11/data/pg_stat 4 /data/postgresql11/data/pg_tblspc 4 /data/postgresql11/data/pg_twophase 4 /data/postgresql11/data/postgresql.auto.conf 4 /data/postgresql11/data/postmaster.opts 4 /data/postgresql11/data/postmaster.pid 8 /data/postgresql11/data/pg_hba.conf 12 /data/postgresql11/data/pg_notify 16 /data/postgresql11/data/pg_logical 24 /data/postgresql11/data/postgresql.conf 28 /data/postgresql11/data/pg_multixact 196 /data/postgresql11/data/pg_subtrans 732 /data/postgresql11/data/pg_stat_tmp 940 /data/postgresql11/data/global 1328 /data/postgresql11/data/pg_xact 76076 /data/postgresql11/data/serverlog.20200414 81988 /data/postgresql11/data/pg_wal 90268 /data/postgresql11/data/serverlog 16672568 /data/postgresql11/data/base The databases (or it least their content) are below /data/postgresql11/data/base (because of the size of ~81 GByte). So the question remains: What I have to move by tar to get the cluster setup on the new host, but without the databases in it? If this is not possible, I will only copy over the software from /usr/local/sisis-pap/pgsql/ and create the cluster from scratch. Thanks matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub