From: Michael Paquier <michael@paquier.xyz>
To: phil@philphonic.de
To: pgsql-docs@lists.postgresql.org
Subject: Re: incoorect restore_command
Date: Wed, 24 Feb 2021 14:49:14 +0900
Message-ID: <YDXo2tIJmkW6mhkm@paquier.xyz> (raw)
In-Reply-To: <161397938841.15451.13129264141285167267@wrigleys.postgresql.org>
References: <161397938841.15451.13129264141285167267@wrigleys.postgresql.org>
On Mon, Feb 22, 2021 at 07:36:28AM +0000, PG Doc comments form wrote:
> I've been trying out saving and restoring compressed archive logs. The
> restore_command stated in the docs at "25.3.6.2. Compressed Archive Logs"
> ('gunzip < /mnt/server/archivedir/%f > %p') did not work for me, because the
> archive_command ('gzip < %p > /var/lib/pgsql/archive/%f') alters the
> filename to %f.gz
On which platform please? Using a pipe with gzip does not alter the
output file name where the data is pushed to.
> I had to change the restore_command to 'gunzip <
> /mnt/server/archivedir/%f.gz > %p'.
Now, I kind of agree that compressing a file and not using a proper
.gz extension for its name can be confusing. So what about the
attached to tweak both archive_command and restore_command in this
section of the docs?
--
Michael
Attachments:doc-archive-gz.patch (text/x-diff, 827B) downloaddiff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgmlindex 3c8aaed0b6..089102a599 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
<application>gzip</application> to compress the archive files:
<programlisting>
-archive_command = 'gzip < %p > /var/lib/pgsql/archive/%f'+archive_command = 'gzip < %p > /var/lib/pgsql/archive/%f.gz'
</programlisting>
You will then need to use <application>gunzip</application> during recovery:
<programlisting>
-restore_command = 'gunzip < /mnt/server/archivedir/%f > %p'+restore_command = 'gunzip < /mnt/server/archivedir/%f.gz > %p'
</programlisting>
</para>
</sect3>
signature.asc (application/pgp-signature, 832B) download
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: michael@paquier.xyz, phil@philphonic.de, pgsql-docs@lists.postgresql.org
Subject: Re: incoorect restore_command
In-Reply-To: <YDXo2tIJmkW6mhkm@paquier.xyz>
* 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