From: Stephen Frost <sfrost@snowman.net>
To: Brajendra Pratap Singh <singh.bpratap766@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: restore_command for postgresql streaming replication
Date: Thu, 2 Jul 2020 11:32:52 -0400
Message-ID: <20200702153252.GR3125@tamriel.snowman.net> (raw)
In-Reply-To: <CAFD-joOvG0b_cEA0t2oDpKni2gpPxRyhET2mP60a8sfVUjVMjA@mail.gmail.com>
References: <CAFD-joOvG0b_cEA0t2oDpKni2gpPxRyhET2mP60a8sfVUjVMjA@mail.gmail.com>
Greetings,
* Brajendra Pratap Singh (singh.bpratap766@gmail.com) wrote:
> Please help us to configure the restore_command on postgresql replication
> server's recovery.conf file incase of ERROR: requested wal segment has
> already been removed on primary and when we have implemented pgbackrest on
> primary database.
>
> Primary database -
>
> archive_command = 'pgbackrest --stanza=uatodb archive-push %p'
For this, the restore_command would be:
restore_command = 'pgbackrest --stanza=uatodb archive-get %f "%p"'
When you use pgbackrest to do a restore with 'pgbackrest restore',
pgbackrest will also write the correct restore_command into the
configuration for the restored system for you.
You might want to check out the user guide:
https://pgbackrest.org/user-guide.html
(that's for v10 on Debian, there's a couple other user guides if you're
on something different that you could look at)
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: sfrost@snowman.net, singh.bpratap766@gmail.com
Subject: Re: restore_command for postgresql streaming replication
In-Reply-To: <20200702153252.GR3125@tamriel.snowman.net>
References: <CAFD-joOvG0b_cEA0t2oDpKni2gpPxRyhET2mP60a8sfVUjVMjA@mail.gmail.com> <20200702153252.GR3125@tamriel.snowman.net>
* 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