Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit924e1d0

Browse files
committed
doc: add example of using pg_dump with GNU split and gzip
This is only possible with GNU split, not other versions like BSD split.Reported-by: jim@jdoherty.netDiscussion:https://postgr.es/m/162653459215.701.6323855956817776386@wrigleys.postgresql.orgBackpatch-through: 9.6
1 parentfb23408 commit924e1d0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎doc/src/sgml/backup.sgml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,17 +273,26 @@ cat <replaceable class="parameter">filename</replaceable>.gz | gunzip | psql <re
273273
The <command>split</command> command
274274
allows you to split the output into smaller files that are
275275
acceptable in size to the underlying file system. For example, to
276-
makechunks of 1 megabyte:
276+
make2 gigabyte chunks:
277277

278278
<programlisting>
279-
pg_dump <replaceable class="parameter">dbname</replaceable> | split -b1m - <replaceable class="parameter">filename</replaceable>
279+
pg_dump <replaceable class="parameter">dbname</replaceable> | split -b2G - <replaceable class="parameter">filename</replaceable>
280280
</programlisting>
281281

282282
Reload with:
283283

284284
<programlisting>
285285
cat <replaceable class="parameter">filename</replaceable>* | psql <replaceable class="parameter">dbname</replaceable>
286286
</programlisting>
287+
288+
If using GNU <application>split</application>, it is possible to
289+
use it and <application>gzip</application> together:
290+
291+
<programlisting>
292+
pg_dump <replaceable class="parameter">dbname</replaceable> | split -b 2G --filter='gzip > $FILE.gz'
293+
</programlisting>
294+
295+
It can be restored using <command>zcat</command>.
287296
</para>
288297
</formalpara>
289298

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp