Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 329784e

Browse files
committed
doc: Improve {archive,restore}_command for compressed logs
The commands mentioned in the docs with gzip and gunzip did not prefix the archives with ".gz" and used inconsistent paths for the archives, which can be confusing. Reported-by: Philipp Gramzow Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/161397938841.15451.13129264141285167267@wrigleys.postgresql.org
1 parent 8556267 commit 329784e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/src/sgml/backup.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1520,11 +1520,11 @@ tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
15201520
If archive storage size is a concern, you can use
15211521
<application>gzip</application> to compress the archive files:
15221522
<programlisting>
1523-
archive_command = 'gzip &lt; %p &gt; /var/lib/pgsql/archive/%f'
1523+
archive_command = 'gzip &lt; %p &gt; /mnt/server/archivedir/%f.gz'
15241524
</programlisting>
15251525
You will then need to use <application>gunzip</application> during recovery:
15261526
<programlisting>
1527-
restore_command = 'gunzip &lt; /mnt/server/archivedir/%f &gt; %p'
1527+
restore_command = 'gunzip &lt; /mnt/server/archivedir/%f.gz &gt; %p'
15281528
</programlisting>
15291529
</para>
15301530
</sect3>

0 commit comments

Comments
 (0)