Re: pg_basebackup --incremental

From: Sam Stearns <sam(dot)stearns(at)dat(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_basebackup --incremental
Date: 2025-10-31 15:33:40
Message-ID: CAN6TVj=hjfvHWmXSemMBz3Y9SMGpig9j4FW0SVYSoVmnAyR9OQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks, Ron.

On Fri, Oct 31, 2025 at 8:17 AM Ron Johnson <ronljohnsonjr(at)gmail(dot)com> wrote:

> Note that pg_basebackup is single-threaded, and not encrypted. On Fri, Oct
> 31, 2025 at 10: 26 AM Sam Stearns <sam. stearns@ dat. com> wrote: Thanks
> very much, Serkan. We'll have a look. On Fri, Oct 31, 2025 at 3: 28 AM
> Serkan Akdemir <osmosyum@ hotmail. com>
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
>
> ZjQcmQRYFpfptBannerEnd
> Note that pg_basebackup is single-threaded, and not encrypted.
>
> On Fri, Oct 31, 2025 at 10:26 AM Sam Stearns <sam(dot)stearns(at)dat(dot)com> wrote:
>
>> Thanks very much, Serkan. We'll have a look.
>>
>> On Fri, Oct 31, 2025 at 3:28 AM Serkan Akdemir <osmosyum(at)hotmail(dot)com>
>> wrote:
>>
>>> I created a script for incremental backup+merge on PostgreSQL 17+ It
>>> creates a full backup and later (next run) incremental backups. Incremental
>>> backups are merged to full backup with script, so you have always updated
>>> full backup. Disclaimer:
>>> ZjQcmQRYFpfptBannerStart
>>> This Message Is From an Untrusted Sender
>>> You have not previously corresponded with this sender.
>>>
>>> ZjQcmQRYFpfptBannerEnd
>>> I created a script for incremental backup+merge on PostgreSQL 17+
>>> It creates a full backup and later (next run) incremental backups.
>>> Incremental backups are merged to full backup with script, so you have
>>> always updated full backup.
>>> Disclaimer: use it at your own risk.
>>>
>>> Simple usage is:
>>> # first backup should be full
>>> pg_backup.sh --mode=fulll
>>>
>>> # then inc
>>> pg_backup.sh --mode=fincremental
>>>
>>> medium-resources/pg_backup.sh at main · rdnkrkmz/medium-resources
>>> <https://github.com/rdnkrkmz/medium-resources/blob/main/pg_backup.sh>
>>> github.com
>>> <https://github.com/rdnkrkmz/medium-resources/blob/main/pg_backup.sh>
>>> [image: apple-touch-icon-180x180-a80b8e11abe2.png]
>>> <https://github.com/rdnkrkmz/medium-resources/blob/main/pg_backup.sh>
>>> <https://github.com/rdnkrkmz/medium-resources/blob/main/pg_backup.sh>
>>>
>>>
>>> On 28 Oct 2025, at 20:42, Sam Stearns <sam(dot)stearns(at)dat(dot)com> wrote:
>>>
>>> Howdy,
>>>
>>> We're running version 17.6. Would anyone be able to point me to, or
>>> provide, some sample use cases / scripts / usage to deploy a pg_basebackup
>>> full + --incremental strategy as a backup solution, please?
>>>
>>> This will be used temporarily as we are migrating to RDS soon which is
>>> why we're not going with pgBackRest.
>>>
>>> Thanks,
>>>
>>> Sam
>>>
>>> --
>>>
>>> Samuel Stearns
>>> Team Lead - Database
>>> c: 971 762 6879 | o: 971 762 6879 | DAT.com
>>>
>>> <https://www.dat.com/?utm_medium=email&utm_source=DAT_email_signature_link>
>>>
>>>
>>>
>>
>> --
>>
>> Samuel Stearns
>> Team Lead - Database
>> c: 971 762 6879 | o: 971 762 6879 | DAT.com
>>
>>
>> <https://www.dat.com/?utm_medium=email&utm_source=DAT_email_signature_link>
>>
>>
>
> --
> Death to <Redacted>, and butter sauce.
> Don't boil me, I'm still alive.
> <Redacted> lobster!
>

--

Samuel Stearns
Team Lead - Database
c: 971 762 6879 | o: 971 762 6879 | DAT.com

<https://www.dat.com/?utm_medium=email&utm_source=DAT_email_signature_link>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Xuneng Zhou 2025-11-01 00:41:33 Re: Question on pg_stat_io showing zero reads/writes for I/O workers
Previous Message Ron Johnson 2025-10-31 15:16:50 Re: pg_basebackup --incremental