pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Aldo Sarmiento <aldo@bigpurpledot.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_backrest restore & streaming replication
Date: Sat, 19 Mar 2016 13:01:10 -0400
Message-ID: <20160319170110.GC3127@tamriel.snowman.net> (raw)
In-Reply-To: <CAHX=r6yBFDmsCq9-h0PibcbpKHYSXru0Mn+EF1k4HqOmx_X7Fg@mail.gmail.com>
References: <CAHX=r6yBFDmsCq9-h0PibcbpKHYSXru0Mn+EF1k4HqOmx_X7Fg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (2+ messages)

Message-ID: <20160319170110.GC3127@tamriel.snowman.net>
Permalink:  ../20160319170110.GC3127@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20160319170110.GC3127@tamriel.snowman.net

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: sfrost@snowman.net, aldo@bigpurpledot.com
  Subject: Re: pg_backrest restore & streaming replication
  In-Reply-To: <20160319170110.GC3127@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