public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Associating a pg_basebackup .backup file with it's saveset?
Date: Sat, 23 Aug 2025 09:56:34 -0400
Message-ID: <CANzqJaDPO2X3XSwj1SC5FA5ybgds0Z0iehX4GpwnOft9eVfOPg@mail.gmail.com> (raw)

PG 16.10

(I'd rather use PgBackRest, but can't due to the fact that
the immutable filesystem where we must store backup files doesn't support
links. 😞)

Thus, 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?

archive_command = '/usr/local/bin/postgres/wal_archive.sh "%p" "%f"'

$ cd /Database/backups/wals
$ dir *backup
-rw------- 1 postgres postgres 341 2025-08-23 08:42:39
000000010000000200000023.00000028.backup
-rw------- 1 postgres postgres 341 2025-08-23 09:24:48
000000010000000200000035.00000028.backup

$ dir /Database/backups/basebackup/
total 0
drwxr-xr-x 2 postgres postgres 113 2025-08-23 08:42:41
2025-08-23_08-42-36_full/
drwxr-xr-x 2 postgres postgres 113 2025-08-23 09:24:50
2025-08-23_09-24-43_full/

$ dir /Database/backups/basebackup/2025-08-23_09-24-43_full/
total 152896
-rw------- 1 postgres postgres    612541 2025-08-23 09:24:48 backup_manifest
-rw------- 1 postgres postgres 153057906 2025-08-23 09:24:48 base.tar.zst
-rw------- 1 postgres postgres   2847732 2025-08-23 09:24:48 pg_wal.tar.xz
-rw-r--r-- 1 postgres postgres     37864 2025-08-23 09:24:50 schemata.tar.xz

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


reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Associating a pg_basebackup .backup file with it's saveset?
  In-Reply-To: <CANzqJaDPO2X3XSwj1SC5FA5ybgds0Z0iehX4GpwnOft9eVfOPg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox