From: Michael Paquier <michael@paquier.xyz>
To: Christopher Pereira <kripper@imatronix.cl>
Cc: pgsql-general@postgresql.org
Subject: Re: pg_basebackup + incremental base backups
Date: Sat, 30 Nov 2019 11:34:30 +0900
Message-ID: <20191130023430.GC99291@paquier.xyz> (raw)
In-Reply-To: <514b14cb-f0b8-157b-2755-d5170ed4d24b@imatronix.cl>
References: <514b14cb-f0b8-157b-2755-d5170ed4d24b@imatronix.cl>
On Fri, Nov 29, 2019 at 04:57:11PM -0300, Christopher Pereira wrote:
> Our stream replication slave server got out of sync so we need to base
> backup again.
>
> In case of big databases, can we do incremental backups with pg_basebackup?
I know of two ways to define such backups, one being actually
incremental and the other differential:
- In the shape of a range of WAL segments, which is incremental. A
full base backup is taken, and then by backing up periodically a range
of WAL segments to make sure that you are able to recover up to the
point you are looking for. Postgres core can help to do that by
itself.
- Using a combination of full backups and differential backups
(differential), the latter containing only (well, mostly) relation
pages which have changed since the last full backup or differential
backup. When restoring, you then need to merge the last full backup
and one or more differential backups, followed by a replay of WAL
segments up to the point you are willing to recover to. In this case
some external tools offer solutions to that problem: pgBackRest and
pg_rman are two I know of.
Other backup solutions on top of the two cited above, like barman, all
have implementations to handle the first type of incremental backup.
> Is there any alternative?
>
> Here was a proposal: https://wiki.postgresql.org/wiki/Incremental_backup
Yeah, nothing has been done in uptream though in this area. That's
more about differential backups.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: michael@paquier.xyz, kripper@imatronix.cl
Subject: Re: pg_basebackup + incremental base backups
In-Reply-To: <20191130023430.GC99291@paquier.xyz>
References: <514b14cb-f0b8-157b-2755-d5170ed4d24b@imatronix.cl> <20191130023430.GC99291@paquier.xyz>
* 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