From 6e054a46b6ac13a6062645f2fd762e0419d327d2 Mon Sep 17 00:00:00 2001 From: Scooby Husky Date: Mon, 17 Aug 2026 22:56:51 -0500 Subject: [PATCH] Fix VPS replica clusters: barmanObjectStore serverName mismatch CNPG's barmanObjectStore.serverName defaults to the externalClusters[] entry's own .name field ('home-backup', an arbitrary label I chose) - NOT the actual source Postgres cluster's name. Home's backup: block (on the real pg-authentik/pg-n8n/pg-nextcloud Clusters) defaults serverName to its own metadata.name instead. Without an explicit override these two disagree, so recovery searches the object store under the wrong server-name prefix and finds nothing - 'no target backup found', confirmed live even after the ScheduledBackup fix produced real, completed base backups. --- .../vps-standby/authentik/manifests/cnpg-cluster.yaml | 9 +++++++++ .../vps-standby/n8n/manifests/cnpg-cluster.yaml | 4 ++++ .../vps-standby/nextcloud/manifests/cnpg-cluster.yaml | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/infrastructure/vps-standby/authentik/manifests/cnpg-cluster.yaml b/infrastructure/vps-standby/authentik/manifests/cnpg-cluster.yaml index 14cbb16..09ac590 100644 --- a/infrastructure/vps-standby/authentik/manifests/cnpg-cluster.yaml +++ b/infrastructure/vps-standby/authentik/manifests/cnpg-cluster.yaml @@ -50,6 +50,15 @@ spec: externalClusters: - name: home-backup barmanObjectStore: + # serverName defaults to the externalClusters[].name ("home-backup") + # here, NOT the source Postgres cluster's actual name - but home's + # barmanObjectStore backup: block (on the pg-authentik Cluster + # itself) defaults serverName to its own metadata.name + # ("pg-authentik"). Without this override, recovery looks for + # backups under the wrong server-name prefix and finds none - + # "no target backup found" despite the backup genuinely existing + # (confirmed live 2026-08-18). + serverName: pg-authentik destinationPath: s3://cnpg-backups/pg-authentik endpointURL: http://vps-minio.minio.svc.cluster.local:9000 s3Credentials: diff --git a/infrastructure/vps-standby/n8n/manifests/cnpg-cluster.yaml b/infrastructure/vps-standby/n8n/manifests/cnpg-cluster.yaml index 0022f95..8c8b119 100644 --- a/infrastructure/vps-standby/n8n/manifests/cnpg-cluster.yaml +++ b/infrastructure/vps-standby/n8n/manifests/cnpg-cluster.yaml @@ -39,6 +39,10 @@ spec: externalClusters: - name: home-backup barmanObjectStore: + # See infrastructure/vps-standby/authentik/manifests/cnpg-cluster.yaml + # for why this override is required (serverName defaults to the + # externalClusters[].name, not the source cluster's real name). + serverName: pg-n8n destinationPath: s3://cnpg-backups/pg-n8n endpointURL: http://vps-minio.minio.svc.cluster.local:9000 s3Credentials: diff --git a/infrastructure/vps-standby/nextcloud/manifests/cnpg-cluster.yaml b/infrastructure/vps-standby/nextcloud/manifests/cnpg-cluster.yaml index d8b7f6f..d33d2f1 100644 --- a/infrastructure/vps-standby/nextcloud/manifests/cnpg-cluster.yaml +++ b/infrastructure/vps-standby/nextcloud/manifests/cnpg-cluster.yaml @@ -38,6 +38,10 @@ spec: externalClusters: - name: home-backup barmanObjectStore: + # See infrastructure/vps-standby/authentik/manifests/cnpg-cluster.yaml + # for why this override is required (serverName defaults to the + # externalClusters[].name, not the source cluster's real name). + serverName: pg-nextcloud destinationPath: s3://cnpg-backups/pg-nextcloud endpointURL: http://vps-minio.minio.svc.cluster.local:9000 s3Credentials: