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 1jUtGf-0005Q4-Vi for pgsql-general@arkaria.postgresql.org; Sat, 02 May 2020 14:37:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jUtGd-0005ek-Je for pgsql-general@arkaria.postgresql.org; Sat, 02 May 2020 14:37:23 +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 1jUtGd-0005ed-CG for pgsql-general@lists.postgresql.org; Sat, 02 May 2020 14:37:23 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jUtGb-0001BU-3r for pgsql-general@lists.postgresql.org; Sat, 02 May 2020 14:37:23 +0000 Received: by mail-wm1-x341.google.com with SMTP id 188so3202419wmc.2 for ; Sat, 02 May 2020 07:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0SksfUvNWiIpHlnV6HTSqAkD5/rIvzA7kTRFEWOSC1g=; b=bMMpo9OqaKmsFkiuxYM9LFjN9lwVFKgeG0qHwk/9UfqxwS6pxzdX8VtTYTMnJmWQ8r 9/B6iuDcU8sl8aO3Z00H4uG5Rylls2v2rIGL08V+A8+NL5U0CrIupM710CV+VnHWtUo0 w4ogCXVpzCb3Q3SXW7Mmw+eSCQ4/jpAxiTbPOjQpMEsVVxXBAwqgGhPWzlU2J/bFAQyV R/Ming2ClcQCjWZkGpPCCW6LsXiCSVl1RBFtIrYbPBPlDe8XAWi73hzYoKzkb+VcXPcR RU6uMDeH/T36YMvP7pmTsS7TM+VreTcssqaduX8GHvsh1k7a7MMsE7+4tnySabf1pIFq PbsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=0SksfUvNWiIpHlnV6HTSqAkD5/rIvzA7kTRFEWOSC1g=; b=fcPa+yUSj5PPshNU6fFqA2etDwjKDwRuCYSu8tJawSMvVaMBE+PwCwsFnPvGlhJEIg QJoQv2ge4Hg4LRFiHsipt/ITy2gmoGyTpzFrAxIVbid/RBdzvlcIECtJzMtv3Sbr2zzg ddX21k2mZiyXV+rH37TPWZxWXBfp65+xFkNlrGufNcNZDWCh5zjvDCGe4QRw0jd+lSsd YtP5PbWgoSlaHt6qc1W3K5fNFmw3QMuY9KgjjiPTPbO2olaTI91UctM4AsI6MfGPdX2x hzz7a7MuKdBAbxtHKh9oGsCXjU7wOShlKoa34sB5HsKMyTMaWrCUXt8yRghca8RoAkz8 HiCg== X-Gm-Message-State: AGi0PuZf/kTCT/MxzbBRWx+JFy/ZXyCDLzIfHwodnJedcupVPTmf7oB3 PMrGUN9ps3myeVA1SLpkVuU= X-Google-Smtp-Source: APiQypJKWHtdPg5nzES6SEWNzUoamMJJLApauCKmMsHmLHl1Q1JhuR1eUnKIONscX28daJBG5kG1pA== X-Received: by 2002:a1c:6405:: with SMTP id y5mr4584152wmb.63.1588430238806; Sat, 02 May 2020 07:37:18 -0700 (PDT) Received: from [192.168.1.8] (241-57-239-77.dyn.cable.fcom.ch. [77.239.57.241]) by smtp.gmail.com with ESMTPSA id u3sm9092134wrt.93.2020.05.02.07.37.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 May 2020 07:37:18 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: How to move a 11.4 cluster to another Linux host, but empty? From: =?utf-8?Q?Paul_F=C3=B6rster?= In-Reply-To: <20200502143031.GA16477@c720-r342378> Date: Sat, 2 May 2020 16:37:17 +0200 Cc: pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: 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> To: Matthias Apitz X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Matthias, > On 02. May, 2020, at 16:30, Matthias Apitz wrote: >=20 > El d=C3=ADa s=C3=A1bado, mayo 02, 2020 a las 03:23:52p. m. +0200, Paul = F=C3=B6rster escribi=C3=B3: >=20 >> /usr/local/sisis-pap/pgsql <=3D software with bin, lib64, share, = etc... >> /data/postgresql11/data <=3D PGDATA >=20 > Exactly, his is the setup above. >=20 > 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.=20 >=20 > 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=