doc: Improve {archive,restore}_command for compressed logs
authorMichael Paquier <[email protected]>
Fri, 26 Feb 2021 05:39:03 +0000 (14:39 +0900)
committerMichael Paquier <[email protected]>
Fri, 26 Feb 2021 05:39:03 +0000 (14:39 +0900)
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

doc/src/sgml/backup.sgml

index 3c8aaed0b6203ccb7db5a2cd363bbf8450d9ddb0..21094c6a9d056e3c3a0affbea3a6706ab84dc2f2 100644 (file)
@@ -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
       <application>gzip</application> to compress the archive files:
 <programlisting>
-archive_command = 'gzip &lt; %p &gt; /var/lib/pgsql/archive/%f'
+archive_command = 'gzip &lt; %p &gt; /mnt/server/archivedir/%f.gz'
 </programlisting>
       You will then need to use <application>gunzip</application> during recovery:
 <programlisting>
-restore_command = 'gunzip &lt; /mnt/server/archivedir/%f &gt; %p'
+restore_command = 'gunzip &lt; /mnt/server/archivedir/%f.gz &gt; %p'
 </programlisting>
      </para>
     </sect3>