pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Christopher Pereira <kripper@imatronix.cl>
Cc: pgsql-general@postgresql.org
Subject: Re: pg_basebackup + incremental base backups
Date: Thu, 21 May 2020 08:43:03 -0400
Message-ID: <20200521124303.GV3418@tamriel.snowman.net> (raw)
In-Reply-To: <367ee69d-9dc7-4de6-f8a1-b460567bcc07@imatronix.cl>
References: <514b14cb-f0b8-157b-2755-d5170ed4d24b@imatronix.cl>
	<20191204030907.GB6962@tamriel.snowman.net>
	<367ee69d-9dc7-4de6-f8a1-b460567bcc07@imatronix.cl>

Greetings,

* Christopher Pereira (kripper@imatronix.cl) wrote:
> >>In case of big databases, can we do incremental backups with pg_basebackup?
> >pg_basebackup doesn't support incremental backups, though there's been
> >discussion of adding some kind of support for it, check -hackers if
> >you're curious.
> >
> >>Is there any alternative?
> >There's a few different alternatives for PG backup software, some of
> >which support incremental backups and restores.  I'm personally involved
> >with pgbackrest- https://pgbackrest.org though there's other options out
> >there also (wal-g, barman, and more).
> 
> We tried pgbackrest as a solution to rebuild the standby cluster, by making
> a differential backup of the primary cluster.
> 
> But it seems that pgbackrest is only able to rebuild the standby cluster by
> restoring an existing backup from a repository cluster, and not directly
> from the primary cluster.

Yes, pgbackrest is a full solution for backups, not just a clone sync
tool.

> We are afraid that creating a backup on the repository cluster is an
> additional step that could be avoided.

Ideally you'd be taking regular backups and therefore would have one to
use to perform the restore (or delta restore if you're trying to catch
up a replica that's fallen behind).  Note that with pgbackrest, you
don't need to take a *new* backup, if you're already using it for your
regular backups- just do a delta restore and pgbackrest will
automatically pick the latest backup (of whatever type) and will restore
using it.

> Is there some way to rebuild the standby cluster by doing a differential
> backup of the primary cluster directly?

We've contemplated adding support for something like this to pgbackrest,
since all the pieces are there, but there hasn't been a lot of demand
for it and it kind of goes against the idea of having a proper backup
solution, really..  It'd also create quite a bit of load on the primary
to checksum all the files to do the comparison against what's on the
replica that you're trying to update, so not something you'd probably
want to do a lot more than necessary.

Thanks,

Stephen

Attachments:

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

view thread (11+ messages)  latest in thread

Message-ID: <20200521124303.GV3418@tamriel.snowman.net>
Permalink:  ../20200521124303.GV3418@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20200521124303.GV3418@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 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, kripper@imatronix.cl
  Subject: Re: pg_basebackup + incremental base backups
  In-Reply-To: <20200521124303.GV3418@tamriel.snowman.net>
  References: <514b14cb-f0b8-157b-2755-d5170ed4d24b@imatronix.cl> <20191204030907.GB6962@tamriel.snowman.net> <367ee69d-9dc7-4de6-f8a1-b460567bcc07@imatronix.cl> <20200521124303.GV3418@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