Re: Associating a pg_basebackup .backup file with it's saveset? - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Associating a pg_basebackup .backup file with it's saveset?
Date
Msg-id 27ff6d69809fe9090b4f8a3bfa0f30e9670b0d1a.camel@cybertec.at
Whole thread Raw
In response to Associating a pg_basebackup .backup file with it's saveset?  (Ron Johnson <ronljohnsonjr@gmail.com>)
List pgsql-admin
On Sat, 2025-08-23 at 09:56 -0400, Ron Johnson wrote:
> I'm archiving WAL files and taking basebackups.
>
> At some point, when I'm ready to delete the oldest basebackup directory,
> I'll also of course need to run "pg_archivecleanup /Database/backups/wals mumble".
>
> The .backup file is not in the pg_wal.tar file, so how do I know which .backup file to use?

One thing you can use is the "backup_label" file in the base backup.
Its first line will look like

  START WAL LOCATION: 0/B000028 (file 00000001000000000000000B)

You would have to extract the WAL file name from the text.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Ron Johnson
Date:
Subject: Associating a pg_basebackup .backup file with it's saveset?
Next
From: Sunil Jadhav
Date:
Subject: PGD 5.8.0 setup replication lag issue