change(nextcloud-db): postgres backup

This commit is contained in:
nold 2022-12-14 10:14:27 +01:00
parent 031577536b
commit d14a0b7fcf

View file

@ -8,13 +8,8 @@ spec:
imageName: ghcr.io/cloudnative-pg/postgresql:15
bootstrap:
initdb:
import:
type: microservice
databases:
- nextcloud
source:
externalCluster: nextcloud
recovery:
source: clusterBackup
backup:
barmanObjectStore:
@ -47,11 +42,27 @@ spec:
size: 10Gi
externalClusters:
- name: nextcloud
connectionParameters:
host: nextcloud-postgresql.nextcloud.svc.cluster.local
user: nextcloud
dbname: nextcloud
password:
name: nextcloud-postgres
key: postgresql-password
- name: clusterBackup
barmanObjectStore:
destinationPath: "s3://nextcloud-db/"
endpointURL: "http://minio.minio.svc.cluster.local:9000"
s3Credentials:
accessKeyId:
name: bucket
key: accesskey
secretAccessKey:
name: bucket
key: secretkey
wal:
maxParallel: 8
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: nextcloud-db-backup
namespace: nextcloud
spec:
schedule: "0 0 0 * * *"
backupOwnerReference: self
cluster:
name: nextcloud-db