Re: Running rsync backups in pg15

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Running rsync backups in pg15
Date: 2024-11-07 17:34:22
Message-ID: CANzqJaDqz07cB160gZo6dZ2U_i2PxgJw4hqdehpRjRwLDne2KQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Nov 7, 2024 at 11:35 AM Murthy Nunna <mnunna(at)fnal(dot)gov> wrote:

> Hi,
>
>
>
> In PG14 and earlier, there is no requirement to keep database connection
> while rsync is in progress. However, there is a change in PG15+ that
> requires rsync to be while we have the same database session open that
> executes SELECT pg_backup_start('label'). This change requires a rewrite
> of existing scripts we have.
>
>
>
> Currently (pg14):
>
>
>
> In bash script (run from cron)
>
> 1. psql Select pg_start_backup
> 2. rsync
> 3. psql Select pg_stop_backup
>
>
>
> In pg15 and later:
>
>
>
> In bash script (run from cron)
>
>
>
> psql
>
> Select pg_start_backup
>
> ! run-rsync-script
>
> Select pg_stop_backup
>
>
>
> It can be done, but it makes it ugly to check errors and so forth that
> occur in the rsync script.
>
>
>
> Anybody found an elegant way of doing this?
>

Run pgbackrest instead of rsync,

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Evan Rempel 2024-11-07 17:47:17 Re: Running rsync backups in pg15
Previous Message Murthy Nunna 2024-11-07 16:35:10 Running rsync backups in pg15