diff --git a/kubernetes/apps/database/crunchy-postgres-operator/cluster/externalsecret.yaml b/kubernetes/apps/database/crunchy-postgres-operator/cluster/externalsecret.yaml index 50534f11..7b74eea7 100644 --- a/kubernetes/apps/database/crunchy-postgres-operator/cluster/externalsecret.yaml +++ b/kubernetes/apps/database/crunchy-postgres-operator/cluster/externalsecret.yaml @@ -17,9 +17,12 @@ spec: [global] repo1-s3-key={{ .minio_crunchy_postgres_access_key }} repo1-s3-key-secret={{ .minio_crunchy_postgres_secret_key }} + repo2-s3-key={{ .hetzner_PGB_ACCESS_KEY }} + repo2-s3-key-secret={{ .hetzner_PGB_SECRET_KEY }} encryption.conf: | [global] repo1-cipher-pass={{ .crunchy_postgres_backup_encryption_cipher }} + repo2-cipher-pass={{ .crunchy_postgres_backup_encryption_cipher }} dataFrom: - extract: key: crunchy-postgres diff --git a/kubernetes/apps/database/crunchy-postgres-operator/cluster/postgrescluster.yaml b/kubernetes/apps/database/crunchy-postgres-operator/cluster/postgrescluster.yaml index 148e7dbb..b9fa4ef8 100644 --- a/kubernetes/apps/database/crunchy-postgres-operator/cluster/postgrescluster.yaml +++ b/kubernetes/apps/database/crunchy-postgres-operator/cluster/postgrescluster.yaml @@ -157,16 +157,19 @@ spec: - secret: name: crunchy-postgres-secret global: &backupFlag - archive-timeout: "60" compress-type: "bz2" compress-level: "9" - delta: "y" + # Minio repo1-retention-full-type: "time" repo1-retention-full: "14" repo1-retention-diff: "30" repo1-path: "/crunchy-pgo" repo1-s3-uri-style: path - archive-push-queue-max: 4GiB + # Hetzner + repo2-retention-full-type: "time" + repo2-retention-full: "7" + repo2-path: "/crunchy-pgo" + repo2-s3-uri-style: path manual: repoName: repo1 options: @@ -184,6 +187,14 @@ spec: full: "0 1 * * 0" # Sunday at 01:00 differential: "0 1 * * 1-6" # Mon-Sat at 01:00 incremental: "0 2-23 * * *" # Every hour except 01:00 + - name: repo2 # Hetzner Object Storage + s3: &hetzner + bucket: "hsn-pgb" + endpoint: ${CLUSTER_SECRET_HETZNER_PGB_ENDPOINT} + region: "fsn1" + schedules: + full: "0 2 * * 0" # Sunday at 02:00 + incremental: "0 2 * * 1-6/2" # Mon,Wed,Fri at 02:00 dataSource: pgbackrest: