Re: pg_basebackup + incremental base backups

From: Christopher Pereira <kripper(at)imatronix(dot)cl>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_basebackup + incremental base backups
Date: 2020-05-21 21:31:00
Message-ID: c037dc53-2031-b81b-5a4c-609a20e3d535@imatronix.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 21-May-20 08:43, Stephen Frost wrote:
> * Christopher Pereira (kripper(at)imatronix(dot)cl) wrote:
>
> [...]
>> 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.

We have backups of the whole server and only need a efficient way to
rebuild the hot-standby cluster when pg_rewind is not able to do so.

I agree with your concerns about the increased load on the primary
server, but this rebuilding process would only be done in case of
emergency or during low load hours.

pg_basebackup works fine but does not support differential/incremental
backups which is a blocker.

Do you know any alternative software that is able to rebuild the standby
PG data dir using rsync or similar while the primary is still online?

It seems a simple pg_start_backup + rsync + pg_stop_backup (maybe
combined with a LVM snapshot) would do, but we would prefer to use some
existing tool.

We just tried barman, but it also seems to require a restore from the
backup before being able to start the standby server (?), and we are
afraid this would require double storage, IO and time for rebuilding the
standby cluster.

Thanks.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ravi Krishna 2020-05-21 21:49:37 Re: Table partitioning for cloud service?
Previous Message Rory Campbell-Lange 2020-05-21 21:19:21 Re: Strategy for materialisation and centralisation of data