Re: incoorect restore_command

Philipp Gramzow <phil@philphonic.de>

From: Philipp Gramzow <phil@philphonic.de>
To: Michael Paquier <michael@paquier.xyz>, pgsql-docs@lists.postgresql.org
Date: 2021-02-24T06:24:17Z
Lists: pgsql-docs
Am 24.02.2021 um 06:49 schrieb Michael Paquier:
> 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.
We're on RHEL 7. Thanks for pointing out my mistake, someone altered our 
archive_command to use .gz extensions without me noticing it. Please 
excuse the confusion.
>> 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
I agree, using a proper extension would be more straightforward. I'm 
sure that's the reason why someone changed our archive_command.

Phil



Commits

  1. doc: Improve {archive,restore}_command for compressed logs