Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ixPgt-00077e-Bf for pgsql-general@arkaria.postgresql.org; Fri, 31 Jan 2020 06:22:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ixPgs-00018r-5f for pgsql-general@arkaria.postgresql.org; Fri, 31 Jan 2020 06:22:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ixPgr-00018j-PJ for pgsql-general@lists.postgresql.org; Fri, 31 Jan 2020 06:22:05 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ixPgn-0007ZQ-D6 for pgsql-general@postgresql.org; Fri, 31 Jan 2020 06:22:04 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 8F94D19A2; Fri, 31 Jan 2020 08:21:58 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UW7g12uFP36T; Fri, 31 Jan 2020 08:21:55 +0200 (EET) Received: from mail.hot.ee (hot-relayhost1.estpak.ee [213.180.2.79]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id ED1E61945; Fri, 31 Jan 2020 08:21:55 +0200 (EET) Received: from dell2 (82.131.28.78.cable.starman.ee [82.131.28.78]) (Authenticated sender: kobruleht2) by HOT-Relayhost1.estpak.ee (Postfix) with ESMTPSA id 4886ZB5FbWz9RB; Fri, 31 Jan 2020 08:21:53 +0200 (EET) Message-ID: From: "Andrus" To: "pgsql-general" , "Adrian Klaver" References: <8f1d29bd-907e-e1c5-cc5f-2b9cade5af19@aklaver.com> <332CC5FE386B4B86AAE5556896A635ED@dell2> <8ac01396-cf14-0198-c49f-5f0bd298e544@aklaver.com> In-Reply-To: <8ac01396-cf14-0198-c49f-5f0bd298e544@aklaver.com> Subject: Re: How to restore to empty database Date: Fri, 31 Jan 2020 08:21:45 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="windows-1257"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi! >These days 37 GB is relatively small, so you maybe getting into the realm >of premature optimization. Do the 24 databases represent an entire cluster >you are trying to transfer? Basically yes. Cluster contains also small test database which actually does not need transferred but I can delete it manually after transfer. Also postgres, template0 and template1 are not used directly by applications and probably does not need to be transferred. >If so have you looked at pg_dumpall?: >https://www.postgresql.org/docs/12/app-pg-dumpall.html >It is a text based backup, but it will include all the databases and the >globals. Source cluster is in old Debian 6 Squeeze running Postgres 9.1 Should I create pipe using pg_dumpall and restore everything from old using pipe instead of pg_dump/pg_restore ? Andrus.