Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahKHJ-0005Av-BR for pgsql-admin@arkaria.postgresql.org; Sat, 19 Mar 2016 17:03:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ahKHI-0006Tz-PA for pgsql-admin@arkaria.postgresql.org; Sat, 19 Mar 2016 17:03:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ahKFd-0004Xj-74 for pgsql-admin@postgresql.org; Sat, 19 Mar 2016 17:01:21 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahKFU-0003YI-T7 for pgsql-admin@postgresql.org; Sat, 19 Mar 2016 17:01:20 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id D37935F796; Sat, 19 Mar 2016 13:01:10 -0400 (EDT) Date: Sat, 19 Mar 2016 13:01:10 -0400 From: Stephen Frost To: Aldo Sarmiento Cc: pgsql-admin@postgresql.org Subject: Re: pg_backrest restore & streaming replication Message-ID: <20160319170110.GC3127@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/WyilgS7+6IU2yVA" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-77-generic (x86_64) X-Uptime: 12:36:17 up 25 days, 13:29, 7 users, load average: 0.05, 0.08, 0.07 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --/WyilgS7+6IU2yVA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Aldo, * Aldo Sarmiento (aldo@bigpurpledot.com) wrote: > This is the command I used: /usr/lib/backrest/bin/pg_backrest.pl > --stanza=prod-9.4 restore --log-level-console=info > --db-path=/var/lib/postgresql/9.4/replica --thread-max=4 --delta > After starting the replica back up, I noticed that it was no longer doing > streaming replication. Also I noticed the logs said something about not > finding WAL logs that it expected to find (not sure if these two things are > related). The pgbackrest restore command which you used doesn't appear to have included any of the settings necessary to set up a streaming replica. I'm guessing they also weren't included in the pg_backrest.conf file. The only parameters that pgbackrest sets in the recovery.conf by default are those necessary to acquire the necessary XLOGs during restore (the recovery_command option). To add other options to the recovery.conf file (such as those required to start the system as a replica), you can use the --recovery-option to pgbackrest, or add a '[stanza:restore:recovery-option]' section to the pg_backrest.conf file being used. The pgbackrest user guide includes an example of setting up the pg_backrest.conf file with the necessary options: http://www.pgbackrest.org/user-guide.html The "not found" messages are completely normal and expected, PG will ask for XLOGs which don't exist and pgbackrest is just logging that it was asked for an XLOG which didn't exist. Thanks! Stephen --/WyilgS7+6IU2yVA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJW7YXWAAoJEO1sijiDR2RV/EIP/AnEspBMpmc64LLzZoiZQEUr 6NE2jaQ56TyZpPQqWEVuqUOupbXMfx6hw3sVkBb2Jg6y66mTO8cY+Y0LCi2UjdU6 mgDtOGLd145jYeuUCQ3/W2+FM5c9ksAu64cJYfmWZ1+BS2Vw0JDb1eSXWZi5KzZF MUk9PKJLJMs1Xbfx/kHJpPB53rkBD5I0TJfGyBaP9NDF6E4EZqz3ugzfc/v69TCp sqI+597ePkHftNBvhww81P8PWDOg8vCbv7sPiM4Urz0bxBzWFTEbQv2Ip6xq5UEU kD1+54HUIa9IDwa2Wk5CvwGO6p3c3Qum1zo3BTdEp5YFFq5rxz0DXhVu9VTYwGwB ZbHsPn98vYtx/OUEhm6lwnPdPzcGo7Dhil+ssqlabUFnnZW5enX3uxk5lv6+CPxP MzhW3VXPpy13xgHkXoU2XiAmbqT64tzhDmQFegqYWUVEDGPvcO+0xRHA+T+ZDOmj FBGAdp4qLLMm2azLXAVqcOGZXknfmlmhMnP8IIpj5ZojsYR2AbM00W7qwYhqkETb v0G4i53KgfPBSRfenE2QXJW/67aoDqmZXRUrxSt2xFfzzr75NeNL/3I52OM0jMVE E7IqH91Ha9gyZvbBJIqkjnnTWgMw1FQILA0mbKwWlxQ76bSBF98yMQ6H2ZNprpf0 da76BUw2o4zn0pY/B1ZM =MxdN -----END PGP SIGNATURE----- --/WyilgS7+6IU2yVA--