Try with --daemon in two containers
This commit is contained in:
parent
a1e5cce33e
commit
030de7dd64
2 changed files with 23 additions and 8 deletions
|
@ -8,17 +8,16 @@ spec:
|
|||
spec:
|
||||
template:
|
||||
spec:
|
||||
volumes:
|
||||
- name: backup-storage
|
||||
emptyDir: {}
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: backup-container
|
||||
image: docker.sunet.se/drive/duplicity:bookworm-slim-1
|
||||
command: ["bash"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
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)"]
|
||||
command: ["duplicity"]
|
||||
args: ["/backup_storage", "rclone://destination:$(BUCKET)", "--no-encryption", "--full-if-older-than", "1M" ]
|
||||
env:
|
||||
- name: MOUNT_POINT
|
||||
value: /backup_data
|
||||
- name: RCLONE_CONFIG_DESTINATION_ACL
|
||||
value: private
|
||||
- name: RCLONE_CONFIG_DESTINATION_TYPE
|
||||
|
@ -27,6 +26,16 @@ spec:
|
|||
value: s3.sto3.safedc.net
|
||||
- name: RCLONE_CONFIG_DESTINATION_PROVIDER
|
||||
value: Ceph
|
||||
volumeMounts:
|
||||
- name: backup-storage
|
||||
mountPath: /backup_storage
|
||||
mountPropagation: HostToContainer
|
||||
- name: mount-container
|
||||
image: rclone/rclone:1.69.0
|
||||
args: ["mount", "--allow-non-empty", "--daemon", "source:$(BUCKET)", "/backup_storage"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
env:
|
||||
- name: RCLONE_CONFIG_SOURCE_ACL
|
||||
value: private
|
||||
- name: RCLONE_CONFIG_SOURCE_TYPE
|
||||
|
@ -35,3 +44,7 @@ spec:
|
|||
value: s3.sto4.safedc.net
|
||||
- name: RCLONE_CONFIG_SOURCE_PROVIDER
|
||||
value: Ceph
|
||||
volumeMounts:
|
||||
- name: backup-storage
|
||||
mountPath: /backup_storage
|
||||
mountPropagation: Bidirectional
|
||||
|
|
|
@ -12,7 +12,7 @@ spec:
|
|||
containers:
|
||||
- name: backup-container
|
||||
env:
|
||||
- name: DESTINATION_BUCKET
|
||||
- name: BUCKET
|
||||
value: "xrootd-test-mirror"
|
||||
- name: RCLONE_CONFIG_DESTINATION_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
|
@ -24,7 +24,9 @@ spec:
|
|||
secretKeyRef:
|
||||
name: xrootd-secret
|
||||
key: "destination-secret-access-key"
|
||||
- name: SOURCE_BUCKET
|
||||
- name: mount-container
|
||||
env:
|
||||
- name: BUCKET
|
||||
value: "xrootd-test"
|
||||
- name: RCLONE_CONFIG_SOURCE_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
|
|
Loading…
Add table
Reference in a new issue