pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: jim@jdoherty.net
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Another pg_dump using split and gzip for large  databases
Date: Thu, 29 Jul 2021 15:10:34 -0400
Message-ID: <20210729191034.GU9600@momjian.us> (raw)
In-Reply-To: <04E6A89E-19FC-4181-9D95-96B71482944F@yesql.se>
References: <162653459215.701.6323855956817776386@wrigleys.postgresql.org>
	<20210728234605.GA9600@momjian.us>
	<A38B4103-419D-46F7-9CCF-983DC826723D@yesql.se>
	<20210729145855.GF9600@momjian.us>
	<247A4697-C00B-47A9-851A-D213CA83A378@yesql.se>
	<20210729152925.GJ9600@momjian.us>
	<04E6A89E-19FC-4181-9D95-96B71482944F@yesql.se>

On Thu, Jul 29, 2021 at 07:15:21PM +0200, Daniel Gustafsson wrote:
> > On 29 Jul 2021, at 17:29, Bruce Momjian <bruce@momjian.us> wrote:
> > 
> > On Thu, Jul 29, 2021 at 05:23:20PM +0200, Daniel Gustafsson wrote:
> >>> On 29 Jul 2021, at 16:58, Bruce Momjian <bruce@momjian.us> 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 <application>GNU split</application>, it is possible to
> A small nitpick is that we write this as GNU <application>..</application>
> 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  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.

Attachments:

  [text/x-diff] split.diff (1.4K, ../20210729191034.GU9600@momjian.us/2-split.diff)
  download | inline 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 <replaceable class="parameter">filename</replaceable>.gz | gunzip | psql <re
      The <command>split</command> 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:
 
 <programlisting>
-pg_dump <replaceable class="parameter">dbname</replaceable> | split -b 1m - <replaceable class="parameter">filename</replaceable>
+pg_dump <replaceable class="parameter">dbname</replaceable> | split -b 2G - <replaceable class="parameter">filename</replaceable>
 </programlisting>
 
      Reload with:
@@ -284,6 +284,15 @@ pg_dump <replaceable class="parameter">dbname</replaceable> | split -b 1m - <rep
 <programlisting>
 cat <replaceable class="parameter">filename</replaceable>* | psql <replaceable class="parameter">dbname</replaceable>
 </programlisting>
+
+     If using GNU <application>split</application>, it is possible to
+     use it and <application>gzip</application> together:
+
+<programlisting>
+pg_dump <replaceable class="parameter">dbname</replaceable> | split -b 2G --filter='gzip > $FILE.gz'
+</programlisting>
+
+     It can be restored using <command>zcat</command>.
     </para>
    </formalpara>
 

view thread (12+ messages)  latest in thread

Message-ID: <20210729191034.GU9600@momjian.us>
Permalink:  ../20210729191034.GU9600@momjian.us/
Also on:    postgresql.org/message-id/20210729191034.GU9600@momjian.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: bruce@momjian.us, daniel@yesql.se, jim@jdoherty.net, pgsql-docs@lists.postgresql.org
  Subject: Re: Another pg_dump using split and gzip for large  databases
  In-Reply-To: <20210729191034.GU9600@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox