diff --git a/postgres/config/backup/objectstore.yaml b/postgres/config/backup/objectstore.yaml new file mode 100644 index 0000000..67a076a --- /dev/null +++ b/postgres/config/backup/objectstore.yaml @@ -0,0 +1,15 @@ +apiVersion: barmancloud.cnpg.io/v1 +kind: ObjectStore +metadata: + name: truenas-s3 +spec: + configuration: + destinationPath: "s3://weyma-talos-shared-pgsql-new/" + endpointURL: http://10.105.15.20:9000 + s3Credentials: + accessKeyId: + key: s3AccessKey + name: s3-backup-creds + secretAccessKey: + key: s3SecretKey + name: s3-backup-creds \ No newline at end of file diff --git a/postgres/config/s3-backup-auth.yaml b/postgres/config/backup/s3-backup-auth.yaml similarity index 100% rename from postgres/config/s3-backup-auth.yaml rename to postgres/config/backup/s3-backup-auth.yaml diff --git a/postgres/config/scheduled_backup.yaml b/postgres/config/backup/scheduled_backup.yaml similarity index 61% rename from postgres/config/scheduled_backup.yaml rename to postgres/config/backup/scheduled_backup.yaml index ccfc7d8..b2f5916 100644 --- a/postgres/config/scheduled_backup.yaml +++ b/postgres/config/backup/scheduled_backup.yaml @@ -6,4 +6,7 @@ spec: schedule: "0 0 4 * * *" backupOwnerReference: self cluster: - name: weyma-pgsql \ No newline at end of file + name: weyma-pgsql + method: plugin + pluginConfiguration: + name: barman-cloud.cloudnative-pg.io \ No newline at end of file diff --git a/postgres/config/clusters/main.yaml b/postgres/config/clusters/main.yaml index 7f123a8..8c2ff74 100644 --- a/postgres/config/clusters/main.yaml +++ b/postgres/config/clusters/main.yaml @@ -11,17 +11,10 @@ spec: size: 50Gi storageClass: rook-ceph-block - backup: - barmanObjectStore: - destinationPath: "s3://weyma-talos-shared-pgsql-new/" - endpointURL: http://10.105.15.20:9000 - s3Credentials: - accessKeyId: - key: s3AccessKey - name: s3-backup-creds - secretAccessKey: - key: s3SecretKey - name: s3-backup-creds + plugins: + - name: barman-cloud.cloudnative-pg.io + parameters: + barmanObjectName: truenas-s3 inheritedMetadata: labels: