From bfea9abb5f43e2f05f81c8b6df7f4cab45e8aa0a Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 18 Oct 2023 11:36:08 +0200 Subject: [PATCH] Mount correct volumes and use path in backup.sh --- .../docker-backup/image/resources/backup.sh | 1 + .../resources/backup/backup-restore-deployment.yaml | 11 ++++++----- src/main/resources/backup/cron.yaml | 11 ++++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/infrastructure/docker-backup/image/resources/backup.sh b/infrastructure/docker-backup/image/resources/backup.sh index 3de1fce..2b67f4a 100755 --- a/infrastructure/docker-backup/image/resources/backup.sh +++ b/infrastructure/docker-backup/image/resources/backup.sh @@ -9,6 +9,7 @@ function main() { file_env RESTIC_MONTHS_TO_KEEP 12 backup-db-dump + backup-directory "/media" } source /usr/local/lib/functions.sh diff --git a/src/main/resources/backup/backup-restore-deployment.yaml b/src/main/resources/backup/backup-restore-deployment.yaml index 5282413..28c1e16 100644 --- a/src/main/resources/backup/backup-restore-deployment.yaml +++ b/src/main/resources/backup/backup-restore-deployment.yaml @@ -59,15 +59,16 @@ spec: - name: CERTIFICATE_FILE value: "" volumeMounts: - - name: taiga-data-volume - mountPath: /var/backups + - name: taiga-media + mountPath: /media + readOnly: true - name: backup-secret-volume mountPath: /var/run/secrets/backup-secrets readOnly: true - volumes: # ToDo check correct volumes - - name: taiga-data-volume + volumes: + - name: taiga-media persistentVolumeClaim: - claimName: taiga-data-pvc + claimName: taiga-media-data - name: backup-secret-volume secret: secretName: backup-secret \ No newline at end of file diff --git a/src/main/resources/backup/cron.yaml b/src/main/resources/backup/cron.yaml index 643f9c2..45391fe 100644 --- a/src/main/resources/backup/cron.yaml +++ b/src/main/resources/backup/cron.yaml @@ -55,15 +55,16 @@ spec: - name: CERTIFICATE_FILE value: "" volumeMounts: - - name: taiga-data-volume - mountPath: /var/backups + - name: taiga-media + mountPath: /media + readOnly: true - name: backup-secret-volume mountPath: /var/run/secrets/backup-secrets readOnly: true - volumes: #ToDo: check correct volumes - - name: taiga-data-volume + volumes: + - name: taiga-media persistentVolumeClaim: - claimName: taiga-data-pvc + claimName: taiga-media-data - name: backup-secret-volume secret: secretName: backup-secret