Make mount point env var
This commit is contained in:
parent
fb2e06cc64
commit
a1e5cce33e
2 changed files with 4 additions and 2 deletions
|
@ -15,8 +15,10 @@ spec:
|
||||||
command: ["bash"]
|
command: ["bash"]
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
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:
|
env:
|
||||||
|
- name: MOUNT_POINT
|
||||||
|
value: /backup_data
|
||||||
- name: RCLONE_CONFIG_DESTINATION_ACL
|
- name: RCLONE_CONFIG_DESTINATION_ACL
|
||||||
value: private
|
value: private
|
||||||
- name: RCLONE_CONFIG_DESTINATION_TYPE
|
- name: RCLONE_CONFIG_DESTINATION_TYPE
|
||||||
|
|
|
@ -3,7 +3,7 @@ kind: CronJob
|
||||||
metadata:
|
metadata:
|
||||||
name: backup
|
name: backup
|
||||||
spec:
|
spec:
|
||||||
schedule: "15 02 * * *"
|
schedule: "*/5 * * * *"
|
||||||
jobTemplate:
|
jobTemplate:
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
|
|
Loading…
Add table
Reference in a new issue