From a1e5cce33e578237b4fca616510b97377166f222 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Fri, 7 Feb 2025 15:26:06 +0100 Subject: [PATCH] Make mount point env var --- backups/base/backup-cronjob.yaml | 4 +++- backups/overlays/test/xrootd/backup-cronjob.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backups/base/backup-cronjob.yaml b/backups/base/backup-cronjob.yaml index 5662498..56003e9 100644 --- a/backups/base/backup-cronjob.yaml +++ b/backups/base/backup-cronjob.yaml @@ -15,8 +15,10 @@ spec: command: ["bash"] securityContext: privileged: true - args: ["-c", "mkdir /backup_storage; rclone mount -q --daemon source:$(SOURCE_BUCKET) /backup_storage; duplicity /backup_storage rclone://destination:$(DESTINATION_BUCKET) --no-encryption --full-if-older-than 1M; umount /backup_storage"] + args: ["-c", "mkdir -p $(MOUNT_POINT) && rclone mount source:$(SOURCE_BUCKET) $(MOUNT_POINT) --daemon && duplicity $(MOUNT_POINT) rclone://destination:$(DESTINATION_BUCKET) --no-encryption --full-if-older-than 1M; umount $(MOUNT_POINT)"] env: + - name: MOUNT_POINT + value: /backup_data - name: RCLONE_CONFIG_DESTINATION_ACL value: private - name: RCLONE_CONFIG_DESTINATION_TYPE diff --git a/backups/overlays/test/xrootd/backup-cronjob.yaml b/backups/overlays/test/xrootd/backup-cronjob.yaml index 6b36622..f05d93c 100644 --- a/backups/overlays/test/xrootd/backup-cronjob.yaml +++ b/backups/overlays/test/xrootd/backup-cronjob.yaml @@ -3,7 +3,7 @@ kind: CronJob metadata: name: backup spec: - schedule: "15 02 * * *" + schedule: "*/5 * * * *" jobTemplate: spec: template: