|
@@ -196,4 +196,55 @@ spec:
|
|
- name: nextcloud
|
|
- name: nextcloud
|
|
persistentVolumeClaim:
|
|
persistentVolumeClaim:
|
|
claimName: nextcloud
|
|
claimName: nextcloud
|
|
-
|
|
|
|
|
|
+---
|
|
|
|
+apiVersion: batch/v1
|
|
|
|
+kind: CronJob
|
|
|
|
+metadata:
|
|
|
|
+ name: nextcloud-backup-augustin
|
|
|
|
+spec:
|
|
|
|
+ schedule: "@weekly"
|
|
|
|
+ jobTemplate:
|
|
|
|
+ spec:
|
|
|
|
+ template:
|
|
|
|
+ spec:
|
|
|
|
+ affinity:
|
|
|
|
+ nodeAffinity:
|
|
|
|
+ requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
+ nodeSelectorTerms:
|
|
|
|
+ - matchExpressions:
|
|
|
|
+ - key: arch
|
|
|
|
+ operator: In
|
|
|
|
+ values:
|
|
|
|
+ - x86
|
|
|
|
+ containers:
|
|
|
|
+ - name: nextcloud-backup-augustin
|
|
|
|
+ image: qdii/backup-rsync:latest
|
|
|
|
+ env:
|
|
|
|
+ - name: LOCAL_FOLDER_PATH
|
|
|
|
+ value: /mnt/data/Augustin/files
|
|
|
|
+ - name: REMOTE_USER
|
|
|
|
+ value: "uab10c1ba4bc"
|
|
|
|
+ - name: REMOTE_SERVER
|
|
|
|
+ value: "bck.dodges.it"
|
|
|
|
+ - name: REMOTE_FOLDER_PATH
|
|
|
|
+ value: "/home/uab10c1ba4bc/data/vol0/augustin"
|
|
|
|
+ volumeMounts:
|
|
|
|
+ - name: backup
|
|
|
|
+ mountPath: "/root/.ssh/id_rsa"
|
|
|
|
+ subPath: ssh_private_key
|
|
|
|
+ readOnly: true
|
|
|
|
+ - name: backup
|
|
|
|
+ mountPath: "/root/.ssh/id_rsa.pub"
|
|
|
|
+ subPath: ssh_public_key
|
|
|
|
+ readOnly: true
|
|
|
|
+ - name: nextcloud
|
|
|
|
+ mountPath: /mnt
|
|
|
|
+ restartPolicy: Never
|
|
|
|
+ volumes:
|
|
|
|
+ - name: backup
|
|
|
|
+ secret:
|
|
|
|
+ secretName: backup
|
|
|
|
+ defaultMode: 0400
|
|
|
|
+ - name: nextcloud
|
|
|
|
+ persistentVolumeClaim:
|
|
|
|
+ claimName: nextcloud
|