From: Michael Paquier Date: Fri, 26 Feb 2021 05:39:03 +0000 (+0900) Subject: doc: Improve {archive,restore}_command for compressed logs X-Git-Tag: REL_14_BETA1~696 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=329784e11849ff691f0157f3b27c50f652bce76a;p=postgresql.git 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 --- diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 3c8aaed0b62..21094c6a9d0 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1520,11 +1520,11 @@ tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/ If archive storage size is a concern, you can use gzip to compress the archive files: -archive_command = 'gzip < %p > /var/lib/pgsql/archive/%f' +archive_command = 'gzip < %p > /mnt/server/archivedir/%f.gz' You will then need to use gunzip during recovery: -restore_command = 'gunzip < /mnt/server/archivedir/%f > %p' +restore_command = 'gunzip < /mnt/server/archivedir/%f.gz > %p'