Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1upojl-00CZyU-Df for pgsql-admin@arkaria.postgresql.org; Sat, 23 Aug 2025 13:56:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1upoji-00ErJk-CU for pgsql-admin@arkaria.postgresql.org; Sat, 23 Aug 2025 13:56:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1upojh-00ErJN-V9 for pgsql-admin@lists.postgresql.org; Sat, 23 Aug 2025 13:56:50 +0000 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1upojg-001RtJ-17 for pgsql-admin@lists.postgresql.org; Sat, 23 Aug 2025 13:56:50 +0000 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-43601c9fb61so1826218b6e.1 for ; Sat, 23 Aug 2025 06:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755957405; x=1756562205; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=g/vfOswmTUdPBObCTiK7WIrwiJJ+Gk6F10MDYrTJwDQ=; b=MYoG/inZU9M/SMnFT6cA3yIRHVcm1yHeel4jQ1bAa4sWHZrugNnSoGUgkgCRLOD+I9 mt0WOdobpYua1+aTmmYekBtPJyrLHaAn9W3c5IyOVm0OvDDOVWQlIOrWQzlF7+Q9ANjw dZigWaVwcRzVoYCzsCGFmXVcx3+nmPjFtino/Ey2AYp+H3WxDAEJkzLrK4kRkaF/4uKD /GstEXuzdK3YfVowwLpedGqhiBNVjovQPpl2mRPB+JFh52agNG4AOFX6IlfRseklqBuQ XLd8apN2ym4ZK7YSfl3LFh+NvmW+vI7tqrCJUvzoTR8FvNOVEABbepogGvsRD2gce8Yi g68w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755957405; x=1756562205; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=g/vfOswmTUdPBObCTiK7WIrwiJJ+Gk6F10MDYrTJwDQ=; b=m1nH49ijjsLD8oerg2m8ru7/xcF0/wUpoZtfI7QFExASaaR+DbaBNEaxJMjKnOZCvr 0NxX0GO1dKUBX/Z6vTpqREJIdYSm8MoVNwlZw0z9EVcv2Yg5YnKpkCMmq3GDRq3Q6qJL zexMd/2N4TslVkHZsZWJbVwi2kDCE3GS98lbr4P889C+tkThjQKn/lpaEDuYqCnDdGsP YJafIasKjcUSlVWgyqrp7UEHw91Xcu583sfxn78/APls/bwZYzOPI71kmxDqUyh6cl96 4fK1IrgdfyBSWjgKVYssQlx3TZXG+hmPzrcvVYveEZxoCdP6ntxAcL+o3lmDN5i38byu tTtA== X-Gm-Message-State: AOJu0YySlLIlBdRxJET1qM+Bq9irkOZrGuvD31IxB3g8l1LiWb025d7g JJMR5bpf2udjTD4kbmqy32aez9diz6wyfNHKEOrNt/N7mbIdGfvGqsnKtyfvvPFSHPRzYuw8EAM 27hfaz5hQL1UcvLv0NvKFjq6QC+HrVU93/yOz X-Gm-Gg: ASbGncuNBf1HbC2fuWNA/ZJbjMFAJA388W0/yqtjce51ySEthf4OJHCaOsa5DcgiC5e 685TfQQ/VROxvi+s69IlH0IcJYYP/EUnoJdVVGBBigWhk/IqMLLqdSptsS5wMp8N6VF11mkX2zL 6p23Yoos1DQOWd907RJKkc85eeYtGUsKmpQa2laFss/oj8mLZAUNK33em30WGig/78rtytgd9IW VtclahS X-Google-Smtp-Source: AGHT+IEYMDLVJVGvn2fO+Ky01VaqUjPdgS7LfpKnOGa1fZ5GW6+fY+UaR6Ms7TpixJhq0HcatEpRQxgqDr8Haaem73s= X-Received: by 2002:a05:6808:4d0d:b0:437:92ef:abd8 with SMTP id 5614622812f47-43792efafd8mr1726064b6e.9.1755957405456; Sat, 23 Aug 2025 06:56:45 -0700 (PDT) MIME-Version: 1.0 From: Ron Johnson Date: Sat, 23 Aug 2025 09:56:34 -0400 X-Gm-Features: Ac12FXwDIV0JKsaWEEMP4V_pQapyJa56pBDw7obG9GbyO_YPz3zBJJ8jzfjY5-8 Message-ID: Subject: Associating a pg_basebackup .backup file with it's saveset? To: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000649d21063d08b157" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000649d21063d08b157 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. =F0=9F=98=9E) 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 =3D '/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_manifes= t -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.x= z --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000649d21063d08b157 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
PG 16.10

(I'd rather use= PgBackRest, but can't due to the fact that the=C2=A0immutable=C2=A0fil= esystem where we must store backup files doesn't support links. =F0=9F= =98=9E)

Thus, I'm archiving WAL files and taki= ng basebackups.

At some point, when I'm ready = to delete the oldest basebackup directory, I'll also of course need to = run "pg_archivecleanup=C2=A0/Database/backups= /wals mumble".

The .backup file is not= in the=C2=A0pg_wal.tar file, so=C2=A0how do I know which .backup file to u= se?

archive_command =3D &= #39;/usr/local/bin/postgres/wal_archive.sh "%p" "%f"= 9;

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

$ dir /Database/backups/basebackup/
total 0
drwx= r-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-2= 4-43_full/

= $ dir /Database/backups/basebackup/2025-08-23_09-2= 4-43_full/
total 152896
-rw------- 1 postgres postgres =C2=A0 =C2=A06= 12541 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 postgr= es =C2=A0 2847732 2025-08-23 09:24:48 pg_wal.tar.xz
-rw-r--r-- 1 postgre= s postgres =C2=A0 =C2=A0 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!
=
--000000000000649d21063d08b157--