Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jr1Cr-0006Qf-0A for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 15:32:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jr1Cp-0006nR-UE for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 15:32:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jr1Cp-0006nK-MC for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 15:32:55 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jr1Cm-0003Be-WC for pgsql-general@postgresql.org; Thu, 02 Jul 2020 15:32:55 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 6F10A5F79F; Thu, 2 Jul 2020 11:32:52 -0400 (EDT) Date: Thu, 2 Jul 2020 11:32:52 -0400 From: Stephen Frost To: Brajendra Pratap Singh Cc: pgsql-general@postgresql.org Subject: Re: restore_command for postgresql streaming replication Message-ID: <20200702153252.GR3125@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PL7ByiQQFZQ48LyM" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --PL7ByiQQFZQ48LyM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Primary database - >=20 > archive_command =3D 'pgbackrest --stanza=3Duatodb archive-push %p' For this, the restore_command would be: restore_command =3D 'pgbackrest --stanza=3Duatodb 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 --PL7ByiQQFZQ48LyM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJe/f4kAAoJEO1sijiDR2RVTRsQAK5zziYLDjlbjmXXQpUHdL3E MWnZr4xbO0uKEPlMzU1jcc6wkAnVbnnjqJET/c3W8pWllIIcKH9jQ0ijwPnAbBjz 2W8Fj/n8/FpYNNc/9RvyVQRNhN/0w2hsbw2/l06wyJh+tfCieZDDEUBzqgN48uKi oqR3evzT5Iu9S7n9P+SJhfzOP6MHTN6rfEmJrpfdoEyCcOf+WMzljgHrBkqlchCK e8h8WfQ70DGUnJ1KJRElYobms1Lcfs4SOKiuTLg5SBzcTGHxqLeq2fyBqiCB9x00 8LIBxOYhGoMoH1xUrA4ebG9tLIyxlDOfY3/N/5odgDu6Z/209U3zb7XmO1TwQ9/f Pl1Jdc7TpRgNXTVPH2vWOv9X7HoPfZlKzPIzxcyL3DNVxfqKvqRETSyOSHe7rgOx C64zleYbBN3j9Nr4iBtXtvuKFZ28AUPz7WBlSnjCpfIWFctBtHUAKZcpWwgKnaW2 2Deka31SYTr3cvife4Yqiaoe18UXToTK6ZywQ3JyBLN9hDxZeaVGXcrBCE8voHmC e8u2JeNHQ5BgdQYqcs4YiQwZjuQkQzLX6govPrsvJGx0IiAcIA53qzJWNb/Jn6z4 R1kVTAXLEUTsx/Y32d951LTVqKYhcpNuQNLasD3pO12FBBm0GB2k4OgqSs75iey9 NYaZNc3LSF6TqcYuaWEA =Pqor -----END PGP SIGNATURE----- --PL7ByiQQFZQ48LyM--