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 1m9BQV-0000zd-Lq for pgsql-docs@arkaria.postgresql.org; Thu, 29 Jul 2021 19:10:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m9BQU-0006t9-L3 for pgsql-docs@arkaria.postgresql.org; Thu, 29 Jul 2021 19:10:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9BQU-0006t1-F2 for pgsql-docs@lists.postgresql.org; Thu, 29 Jul 2021 19:10:38 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9BQS-0003sO-3z for pgsql-docs@lists.postgresql.org; Thu, 29 Jul 2021 19:10:37 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1m9BQQ-00059P-Fe; Thu, 29 Jul 2021 15:10:34 -0400 Date: Thu, 29 Jul 2021 15:10:34 -0400 From: Bruce Momjian To: Daniel Gustafsson Cc: jim@jdoherty.net, pgsql-docs@lists.postgresql.org Subject: Re: Another pg_dump using split and gzip for large databases Message-ID: <20210729191034.GU9600@momjian.us> References: <162653459215.701.6323855956817776386@wrigleys.postgresql.org> <20210728234605.GA9600@momjian.us> <20210729145855.GF9600@momjian.us> <247A4697-C00B-47A9-851A-D213CA83A378@yesql.se> <20210729152925.GJ9600@momjian.us> <04E6A89E-19FC-4181-9D95-96B71482944F@yesql.se> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2oox5VnwalALFvA7" Content-Disposition: inline In-Reply-To: <04E6A89E-19FC-4181-9D95-96B71482944F@yesql.se> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2oox5VnwalALFvA7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 29, 2021 at 07:15:21PM +0200, Daniel Gustafsson wrote: > > On 29 Jul 2021, at 17:29, Bruce Momjian wrote: > > > > On Thu, Jul 29, 2021 at 05:23:20PM +0200, Daniel Gustafsson wrote: > >>> On 29 Jul 2021, at 16:58, Bruce Momjian wrote: > >> > >>> OK, I can adjust it to say "GNU split" or just skip this addition. > >> > >> I don't have strong feelings either way, with a slight preference for writing > >> it as "GNU split" since it's still a good tip for a large amount of readers. > > > > Yes, I am on the fence for the same reasons but lean toward moving > > forward for your same reasons. > > Making it two separate examples is a good idea, tipping the scale to a +1 from me. > > + If using GNU split, it is possible to > A small nitpick is that we write this as GNU .. > elsewhere on this page (like GNU tar for example). OK, updated patch attached. FYI, I put the GNU inside the application name in the first version because we specifically only want the GNU version of that application, but I think taking it out for consistency is fine. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion. --2oox5VnwalALFvA7 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="split.diff" diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 8c9186d277..cba32b6eb3 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -273,10 +273,10 @@ cat filename.gz | gunzip | psql split command allows you to split the output into smaller files that are acceptable in size to the underlying file system. For example, to - make chunks of 1 megabyte: + make 2 gigabyte chunks: -pg_dump dbname | split -b 1m - filename +pg_dump dbname | split -b 2G - filename Reload with: @@ -284,6 +284,15 @@ pg_dump dbname | split -b 1m - cat filename* | psql dbname + + If using GNU split, it is possible to + use it and gzip together: + + +pg_dump dbname | split -b 2G --filter='gzip > $FILE.gz' + + + It can be restored using zcat. --2oox5VnwalALFvA7--