From d1d6e22aa9a99ef248ec51caab59c3b0f559ebc6 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Wed, 29 Oct 2025 17:45:32 -0500 Subject: [PATCH] migrate to local backups --- .../radarr-4k/templates/external-secret.yaml | 11 ++++++-- .../cl01tl/applications/radarr-4k/values.yaml | 24 +++++++++++++---- .../templates/external-secret.yaml | 11 ++++++-- .../applications/radarr-anime/values.yaml | 24 +++++++++++++---- .../templates/external-secret.yaml | 11 ++++++-- .../applications/radarr-standup/values.yaml | 24 +++++++++++++---- .../radarr/templates/external-secret.yaml | 11 ++++++-- .../cl01tl/applications/radarr/values.yaml | 26 ++++++++++++++----- 8 files changed, 113 insertions(+), 29 deletions(-) diff --git a/clusters/cl01tl/applications/radarr-4k/templates/external-secret.yaml b/clusters/cl01tl/applications/radarr-4k/templates/external-secret.yaml index 93782282f..6890221d3 100644 --- a/clusters/cl01tl/applications/radarr-4k/templates/external-secret.yaml +++ b/clusters/cl01tl/applications/radarr-4k/templates/external-secret.yaml @@ -88,10 +88,10 @@ spec: apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: - name: radarr-4k-postgresql-17-cluster-backup-secret-weekly + name: radarr-4k-postgresql-17-cluster-backup-secret-garage namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: radarr-4k-postgresql-17-cluster-backup-secret-weekly + app.kubernetes.io/name: radarr-4k-postgresql-17-cluster-backup-secret-garage app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ .Release.Name }} spec: @@ -113,3 +113,10 @@ spec: key: /garage/home-infra/postgres-backups metadataPolicy: None property: ACCESS_SECRET_KEY + - secretKey: ACCESS_REGION + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_REGION diff --git a/clusters/cl01tl/applications/radarr-4k/values.yaml b/clusters/cl01tl/applications/radarr-4k/values.yaml index f95ef8272..a261a81f7 100644 --- a/clusters/cl01tl/applications/radarr-4k/values.yaml +++ b/clusters/cl01tl/applications/radarr-4k/values.yaml @@ -106,9 +106,10 @@ postgres-17-cluster: recovery: method: objectStore objectStore: - destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/radarr5-4k/radarr5-4k-postgresql-17-cluster + destinationPath: s3://postgres-backups/cl01tl/radarr5-4k/radarr5-4k-postgresql-17-cluster + endpointURL: http://garage-main.garage:3900 index: 1 - endpointCredentials: radarr-4k-postgresql-17-cluster-backup-secret + endpointCredentials: radarr-4k-postgresql-17-cluster-backup-secret-garage backup: objectStore: - name: external @@ -116,12 +117,20 @@ postgres-17-cluster: index: 1 endpointCredentials: radarr-4k-postgresql-17-cluster-backup-secret retentionPolicy: "2d" + isWALArchiver: false + - name: garage-local + destinationPath: s3://postgres-backups/cl01tl/radarr-4k/radarr5-4k-postgresql-17-cluster + index: 1 + endpointURL: http://garage-main.garage:3900 + endpointCredentials: radarr-4k-postgresql-17-cluster-backup-secret-garage + endpointCredentialsIncludeRegion: true + retentionPolicy: "7d" isWALArchiver: true - # - name: garage + # - name: garage-remote # destinationPath: s3://postgres-backups/cl01tl/radarr-4k/radarr5-4k-postgresql-17-cluster # index: 1 # endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900 - # endpointCredentials: radarr-4k-postgresql-17-cluster-backup-secret-weekly + # endpointCredentials: radarr-4k-postgresql-17-cluster-backup-secret-garage # retentionPolicy: "30d" # data: # compression: bzip2 @@ -131,7 +140,12 @@ postgres-17-cluster: suspend: false schedule: "0 0 0 * * *" backupName: external + - name: live-backup + suspend: false + immediate: true + schedule: "0 0 0 * * *" + backupName: garage-local # - name: weekly-backup # suspend: false # schedule: "0 18 4 * * SAT" - # backupName: garage + # backupName: garage-remote diff --git a/clusters/cl01tl/applications/radarr-anime/templates/external-secret.yaml b/clusters/cl01tl/applications/radarr-anime/templates/external-secret.yaml index 67353bb06..20beb063d 100644 --- a/clusters/cl01tl/applications/radarr-anime/templates/external-secret.yaml +++ b/clusters/cl01tl/applications/radarr-anime/templates/external-secret.yaml @@ -88,10 +88,10 @@ spec: apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: - name: radarr-anime-postgresql-17-cluster-backup-secret-weekly + name: radarr-anime-postgresql-17-cluster-backup-secret-garage namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: radarr-anime-postgresql-17-cluster-backup-secret-weekly + app.kubernetes.io/name: radarr-anime-postgresql-17-cluster-backup-secret-garage app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ .Release.Name }} spec: @@ -113,3 +113,10 @@ spec: key: /garage/home-infra/postgres-backups metadataPolicy: None property: ACCESS_SECRET_KEY + - secretKey: ACCESS_REGION + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_REGION diff --git a/clusters/cl01tl/applications/radarr-anime/values.yaml b/clusters/cl01tl/applications/radarr-anime/values.yaml index 9fed45a62..062036d66 100644 --- a/clusters/cl01tl/applications/radarr-anime/values.yaml +++ b/clusters/cl01tl/applications/radarr-anime/values.yaml @@ -100,9 +100,10 @@ postgres-17-cluster: recovery: method: objectStore objectStore: - destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/radarr5-anime/radarr5-anime-postgresql-17-cluster + destinationPath: s3://postgres-backups/cl01tl/radarr5-anime/radarr5-anime-postgresql-17-cluster + endpointURL: http://garage-main.garage:3900 index: 1 - endpointCredentials: radarr-anime-postgresql-17-cluster-backup-secret + endpointCredentials: radarr-anime-postgresql-17-cluster-backup-secret-garage backup: objectStore: - name: external @@ -110,12 +111,20 @@ postgres-17-cluster: index: 1 endpointCredentials: radarr-anime-postgresql-17-cluster-backup-secret retentionPolicy: "2d" + isWALArchiver: false + - name: garage-local + destinationPath: s3://postgres-backups/cl01tl/radarr-anime/radarr5-anime-postgresql-17-cluster + index: 1 + endpointURL: http://garage-main.garage:3900 + endpointCredentials: radarr-anime-postgresql-17-cluster-backup-secret-garage + endpointCredentialsIncludeRegion: true + retentionPolicy: "7d" isWALArchiver: true - # - name: garage + # - name: garage-remote # destinationPath: s3://postgres-backups/cl01tl/radarr-anime/radarr5-anime-postgresql-17-cluster # index: 1 # endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900 - # endpointCredentials: radarr-anime-postgresql-17-cluster-backup-secret-weekly + # endpointCredentials: radarr-anime-postgresql-17-cluster-backup-secret-garage # retentionPolicy: "30d" # data: # compression: bzip2 @@ -125,7 +134,12 @@ postgres-17-cluster: suspend: false schedule: "0 0 0 * * *" backupName: external + - name: live-backup + suspend: false + immediate: true + schedule: "0 0 0 * * *" + backupName: garage-local # - name: weekly-backup # suspend: false # schedule: "0 20 4 * * SAT" - # backupName: garage + # backupName: garage-remote diff --git a/clusters/cl01tl/applications/radarr-standup/templates/external-secret.yaml b/clusters/cl01tl/applications/radarr-standup/templates/external-secret.yaml index 1dc465663..5f1f24a56 100644 --- a/clusters/cl01tl/applications/radarr-standup/templates/external-secret.yaml +++ b/clusters/cl01tl/applications/radarr-standup/templates/external-secret.yaml @@ -88,10 +88,10 @@ spec: apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: - name: radarr-standup-postgresql-17-cluster-backup-secret-weekly + name: radarr-standup-postgresql-17-cluster-backup-secret-garage namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: radarr-standup-postgresql-17-cluster-backup-secret-weekly + app.kubernetes.io/name: radarr-standup-postgresql-17-cluster-backup-secret-garage app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ .Release.Name }} spec: @@ -113,3 +113,10 @@ spec: key: /garage/home-infra/postgres-backups metadataPolicy: None property: ACCESS_SECRET_KEY + - secretKey: ACCESS_REGION + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_REGION diff --git a/clusters/cl01tl/applications/radarr-standup/values.yaml b/clusters/cl01tl/applications/radarr-standup/values.yaml index 18621184d..e71467275 100644 --- a/clusters/cl01tl/applications/radarr-standup/values.yaml +++ b/clusters/cl01tl/applications/radarr-standup/values.yaml @@ -100,9 +100,10 @@ postgres-17-cluster: recovery: method: objectStore objectStore: - destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/radarr5-standup/radarr5-standup-postgresql-17-cluster + destinationPath: s3://postgres-backups/cl01tl/radarr5-standup/radarr5-standup-postgresql-17-cluster + endpointURL: http://garage-main.garage:3900 index: 1 - endpointCredentials: radarr-standup-postgresql-17-cluster-backup-secret + endpointCredentials: radarr-standup-postgresql-17-cluster-backup-secret-garage backup: objectStore: - name: external @@ -110,12 +111,20 @@ postgres-17-cluster: index: 1 endpointCredentials: radarr-standup-postgresql-17-cluster-backup-secret retentionPolicy: "2d" + isWALArchiver: false + - name: garage-local + destinationPath: s3://postgres-backups/cl01tl/radarr-standup/radarr5-standup-postgresql-17-cluster + index: 1 + endpointURL: http://garage-main.garage:3900 + endpointCredentials: radarr-standup-postgresql-17-cluster-backup-secret-garage + endpointCredentialsIncludeRegion: true + retentionPolicy: "7d" isWALArchiver: true - # - name: garage + # - name: garage-remote # destinationPath: s3://postgres-backups/cl01tl/radarr-standup/radarr5-standup-postgresql-17-cluster # index: 1 # endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900 - # endpointCredentials: radarr-standup-postgresql-17-cluster-backup-secret-weekly + # endpointCredentials: radarr-standup-postgresql-17-cluster-backup-secret-garage # retentionPolicy: "30d" # data: # compression: bzip2 @@ -125,7 +134,12 @@ postgres-17-cluster: suspend: false schedule: "0 0 0 * * *" backupName: external + - name: live-backup + suspend: false + immediate: true + schedule: "0 0 0 * * *" + backupName: garage-local # - name: weekly-backup # suspend: false # schedule: "0 22 4 * * SAT" - # backupName: garage + # backupName: garage-remote diff --git a/clusters/cl01tl/applications/radarr/templates/external-secret.yaml b/clusters/cl01tl/applications/radarr/templates/external-secret.yaml index d2896ffe6..aa1f929d9 100644 --- a/clusters/cl01tl/applications/radarr/templates/external-secret.yaml +++ b/clusters/cl01tl/applications/radarr/templates/external-secret.yaml @@ -88,10 +88,10 @@ spec: apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: - name: radarr-postgresql-17-cluster-backup-secret-weekly + name: radarr-postgresql-17-cluster-backup-secret-garage namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: radarr-postgresql-17-cluster-backup-secret-weekly + app.kubernetes.io/name: radarr-postgresql-17-cluster-backup-secret-garage app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ .Release.Name }} spec: @@ -113,3 +113,10 @@ spec: key: /garage/home-infra/postgres-backups metadataPolicy: None property: ACCESS_SECRET_KEY + - secretKey: ACCESS_REGION + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_REGION diff --git a/clusters/cl01tl/applications/radarr/values.yaml b/clusters/cl01tl/applications/radarr/values.yaml index d32574a81..777b00c03 100644 --- a/clusters/cl01tl/applications/radarr/values.yaml +++ b/clusters/cl01tl/applications/radarr/values.yaml @@ -106,9 +106,10 @@ postgres-17-cluster: recovery: method: objectStore objectStore: - destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/radarr5/radarr5-postgresql-17-cluster - index: 2 - endpointCredentials: radarr-postgresql-17-cluster-backup-secret + destinationPath: s3://postgres-backups/cl01tl/radarr5/radarr5-postgresql-17-cluster + endpointURL: http://garage-main.garage:3900 + index: 1 + endpointCredentials: radarr-postgresql-17-cluster-backup-secret-garage backup: objectStore: - name: external @@ -116,12 +117,20 @@ postgres-17-cluster: index: 2 endpointCredentials: radarr-postgresql-17-cluster-backup-secret retentionPolicy: "1d" + isWALArchiver: false + - name: garage-local + destinationPath: s3://postgres-backups/cl01tl/radarr/radarr5-postgresql-17-cluster + index: 1 + endpointURL: http://garage-main.garage:3900 + endpointCredentials: radarr-postgresql-17-cluster-backup-secret-garage + endpointCredentialsIncludeRegion: true + retentionPolicy: "7d" isWALArchiver: true - # - name: garage + # - name: garage-remote # destinationPath: s3://postgres-backups/cl01tl/radarr/radarr5-postgresql-17-cluster # index: 1 # endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900 - # endpointCredentials: radarr-postgresql-17-cluster-backup-secret-weekly + # endpointCredentials: radarr-postgresql-17-cluster-backup-secret-garage # retentionPolicy: "30d" # data: # compression: bzip2 @@ -131,7 +140,12 @@ postgres-17-cluster: suspend: false schedule: "0 0 */12 * * *" backupName: external + - name: live-backup + suspend: false + immediate: true + schedule: "0 0 0 * * *" + backupName: garage-local # - name: weekly-backup # suspend: false # schedule: "0 16 4 * * SAT" - # backupName: garage + # backupName: garage-remote