From: David Steele <david@pgmasters.net>
To: Don Seiler <don@seiler.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pgBackRest backup from standby
Date: Mon, 19 Feb 2018 11:17:33 -0500
Message-ID: <09b97a16-d7c4-e014-4e69-aa8b890cb6cc@pgmasters.net> (raw)
In-Reply-To: <CAHJZqBB+pKxVYm_Np9HF5Ga+aDFK9M2+u9BPOj86ibP3d7nPdA@mail.gmail.com>
References: <CAHJZqBAwmA4g84LV0Kiq58kFCpu835cPraah5i+uTP+4B3H8RQ@mail.gmail.com>
<e0746162-fa29-19af-c735-1ac23007f87b@pgmasters.net>
<CAHJZqBA+yuW3eXqn9OR5brNf1EE8NRbsrYJJpnejEe-BhXrbHg@mail.gmail.com>
<3f5aa386-32df-4ea9-51a6-ae0c918fd04f@pgmasters.net>
<CAHJZqBDp8Yt4atTvyNzV_1_R=9RB8U+2i8jq_X=c9+X=0KDR4A@mail.gmail.com>
<4ae14a90-1f2d-09f6-5e56-1609acad51b0@pgmasters.net>
<CAHJZqBB+pKxVYm_Np9HF5Ga+aDFK9M2+u9BPOj86ibP3d7nPdA@mail.gmail.com>
On 2/19/18 10:32 AM, Don Seiler wrote:
> On Mon, Feb 19, 2018 at 9:21 AM, David Steele <david@pgmasters.net
> <mailto:david@pgmasters.net>> wrote:
>
>
> Yes, they are typically very small. The general exception to this rule
> is if logs are stored in pg_log. I recommend storing logs out of the
> PGDATA dir as they can be quite large and don't really make sense to
> restore to another server.
>
> Files copied from the master will be marked as such in backup.manifest
> (master:true) so you can check for yourself.
>
>
> Good to know. And fortunately for this DB we do have pg_log (and
> pg_xlog) symlinked to different volumes outside of $PGDATA.
If pg_log is symlinked to PGDATA it will be copied. pg_xlog is not
copied in any backup.
>
> > I did come up with a sort of Rube Goldberg-esque workaround for now
> > involving using a clone of the prod standby VM from Veeam backup to use
> > as the backup source (after stopping recovery and opening it as a
> > standalone DB).
>
> You don't get PITR that way, of course, but at least it's a backup. As
> long as your clone is consistent.
>
>
> Yes it's a crash-consistent snapshot-based backup. I've done quite a few
> restores from it and it works great. It can do PITR as well since I
> would have all the WAL files from prod needed to keep recovering. But
> for these cases I just recover it to the first consistent point and open
> it for testing (or backups in this case).
I don't think it would be safe to do PITR on a backup taken in this way.
The WAL diverges even if you suppress a timeline switch.
--
-David
david@pgmasters.net
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: david@pgmasters.net, don@seiler.us
Subject: Re: pgBackRest backup from standby
In-Reply-To: <09b97a16-d7c4-e014-4e69-aa8b890cb6cc@pgmasters.net>
References: <CAHJZqBAwmA4g84LV0Kiq58kFCpu835cPraah5i+uTP+4B3H8RQ@mail.gmail.com> <e0746162-fa29-19af-c735-1ac23007f87b@pgmasters.net> <CAHJZqBA+yuW3eXqn9OR5brNf1EE8NRbsrYJJpnejEe-BhXrbHg@mail.gmail.com> <3f5aa386-32df-4ea9-51a6-ae0c918fd04f@pgmasters.net> <CAHJZqBDp8Yt4atTvyNzV_1_R=9RB8U+2i8jq_X=c9+X=0KDR4A@mail.gmail.com> <4ae14a90-1f2d-09f6-5e56-1609acad51b0@pgmasters.net> <CAHJZqBB+pKxVYm_Np9HF5Ga+aDFK9M2+u9BPOj86ibP3d7nPdA@mail.gmail.com> <09b97a16-d7c4-e014-4e69-aa8b890cb6cc@pgmasters.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