| From: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
|---|---|
| To: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
| Subject: | Associating a pg_basebackup .backup file with it's saveset? |
| Date: | 2025-08-23 13:56:34 |
| Message-ID: | CANzqJaDPO2X3XSwj1SC5FA5ybgds0Z0iehX4GpwnOft9eVfOPg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laurenz Albe | 2025-08-25 07:27:57 | Re: Associating a pg_basebackup .backup file with it's saveset? |
| Previous Message | hubert depesz lubaczewski | 2025-08-22 12:44:04 | Re: Installing from PostgreSQL APT repository on Debian 13 (Trixie) |