update openmediavault with new structure
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 19s

This commit is contained in:
2024-11-25 22:58:10 +00:00
parent 418badf14c
commit 6aae17706b
3 changed files with 32 additions and 33 deletions
+15 -31
View File
@@ -1,8 +1,8 @@
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
name: nextcloud-notes-backup-job-python name: rsync-glacier-job
namespace: nextcloud namespace: backup
spec: spec:
backoffLimit: 6 backoffLimit: 6
template: template:
@@ -10,45 +10,29 @@ spec:
containers: containers:
- command: - command:
- /bin/sh - /bin/sh
- /config/export_notes.sh - /config/rsync.sh
env:
- name: PI_USER_USERNAME
valueFrom:
secretKeyRef:
key: PI_USER_USERNAME
name: nextcloud-credentials
- name: PI_USER_PASSWORD
valueFrom:
secretKeyRef:
key: PI_USER_PASSWORD
name: nextcloud-credentials
image: alpine image: alpine
imagePullPolicy: Always imagePullPolicy: Always
name: notes-backup name: rsync-glacier
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts: volumeMounts:
- mountPath: /backup - name: glacier-backup
name: notes mountPath: /destination
- mountPath: /var/www/html - name: ssd
name: nextcloud-webserver mountPath: /source
- mountPath: /config - mountPath: /config
name: scripts name: scripts
dnsPolicy: ClusterFirst
restartPolicy: Never restartPolicy: Never
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
volumes: volumes:
- name: notes - name: ssd
hostPath:
path: /ssd/
type: Directory
- name: glacier-backup
persistentVolumeClaim: persistentVolumeClaim:
claimName: nextcloud-notes-backup claimName: openmediavault-backup
- name: nextcloud-webserver
persistentVolumeClaim:
claimName: nextcloud-webserver
- configMap: - configMap:
defaultMode: 365 defaultMode: 365
name: nextcloud-export-scripts name: rsync-scripts
name: scripts name: scripts
ttlSecondsAfterFinished: 100 ttlSecondsAfterFinished: 100
+15
View File
@@ -13,4 +13,19 @@ spec:
requests: requests:
storage: 20Gi storage: 20Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: openmediavault-backup
namespace: backup
annotations:
fileType: Backup
spec:
storageClassName: nfs-storage-glacier
accessModes:
- ReadWriteMany
resources:
requests:
storage: 20Gi
@@ -5,8 +5,8 @@ data:
#sleep 3600 #sleep 3600
apk update apk update
apk add rsync apk add rsync
rsync -avv /source/Backup /destination rsync -avvt /source/Backup /destination
rsync -avv /source/Image /destination rsync -avvt /source/Image /destination
kind: ConfigMap kind: ConfigMap
metadata: metadata: