Re: incoorect restore_command

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Philipp Gramzow <phil@philphonic.de>, pgsql-docs@lists.postgresql.org
Date: 2021-02-26T05:42:03Z
Lists: pgsql-docs
On Thu, Feb 25, 2021 at 06:03:57PM +0900, Fujii Masao wrote:
> Regarding the section "Standalone Hot Backups", all the directories and
> file seem to be placed under /var/lib/pgsql, so at least for me it looks a bit
> strange to change only the path of archive directory. So I don't think that
> we need to do this change.
>
> -tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
> +tar -rf /var/lib/pgsql/backup.tar /mnt/server/archivedir/
> 
> Same as above.

Okay.  I found the thing a bit inconsistent while looking at the whole
picture.  Anyway, dropped those two parts.

> -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'
> 
> LGTM. Thanks for the patch!

Thanks for the review.  I have applied only this part, then.
--
Michael

Commits

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