Update pbs-client image on backups.
This commit is contained in:
@@ -34,46 +34,39 @@ spec:
|
|||||||
#mysqldump --column-statistics=0 -u ${MYSQL_USER} -h ${MYSQL_HOST} ${MYSQL_DB} > /data/mariadb-export/backup.sql
|
#mysqldump --column-statistics=0 -u ${MYSQL_USER} -h ${MYSQL_HOST} ${MYSQL_DB} > /data/mariadb-export/backup.sql
|
||||||
mysqldump -u ${MYSQL_USER} -h ${MYSQL_HOST} ${MYSQL_DB} > /data/mariadb-export/backup.sql
|
mysqldump -u ${MYSQL_USER} -h ${MYSQL_HOST} ${MYSQL_DB} > /data/mariadb-export/backup.sql
|
||||||
echo "TRACE: Exporting database finished"
|
echo "TRACE: Exporting database finished"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- name: MYSQL_USER
|
- name: MYSQL_USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: nextcloud-mariadb
|
name: nextcloud-mariadb
|
||||||
key: MARIADB_USER
|
key: MARIADB_USER
|
||||||
|
|
||||||
- name: MYSQL_PWD
|
- name: MYSQL_PWD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: nextcloud-mariadb
|
name: nextcloud-mariadb
|
||||||
key: MARIADB_PASSWORD
|
key: MARIADB_PASSWORD
|
||||||
|
|
||||||
- name: MYSQL_DB
|
- name: MYSQL_DB
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: nextcloud-mariadb
|
name: nextcloud-mariadb
|
||||||
key: MARIADB_DATABASE
|
key: MARIADB_DATABASE
|
||||||
|
|
||||||
- name: MYSQL_HOST
|
- name: MYSQL_HOST
|
||||||
value: nextcloud-mariadb.cloud-limbosolutions-com.svc.cluster.local
|
value: nextcloud-mariadb.cloud-limbosolutions-com.svc.cluster.local
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: backup-var
|
- name: backup-var
|
||||||
mountPath: /data/mariadb-export
|
mountPath: /data/mariadb-export
|
||||||
subPath: mariadb-export
|
subPath: mariadb-export
|
||||||
|
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: gitea-pbs-client
|
- name: gitea-pbs-client
|
||||||
### Maintained by flux - Image Update Automation
|
### Maintained by flux - Image Update Automation
|
||||||
image: oci.limbosolutions.com/public/pbs-client:latest # {"$imagepolicy": "cloud-limbosolutions-com:pbs-client"}
|
image: oci.limbosolutions.com/public/pbs-client:latest@sha256:8565b9d420051cdbd4a9054f29ada099d5c70554218aaed0078ec533117406fc # {"$imagepolicy": "cloud-limbosolutions-com:pbs-client"}
|
||||||
###
|
###
|
||||||
env:
|
env:
|
||||||
- name: PBS_REPOSITORY
|
- name: PBS_REPOSITORY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: backup-secret
|
name: backup-secret
|
||||||
key: PBS_REPOSITORY
|
key: PBS_REPOSITORY
|
||||||
- name: PBS_PASSWORD
|
- name: PBS_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
@@ -84,7 +77,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: backup-secret
|
name: backup-secret
|
||||||
key: PBS_FINGERPRINT
|
key: PBS_FINGERPRINT
|
||||||
|
|
||||||
command: ["bash", "-c"]
|
command: ["bash", "-c"]
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
@@ -93,31 +85,23 @@ spec:
|
|||||||
proxmox-backup-client backup nextcloud-html.pxar:/data/nextcloud-html mariadb-data.pxar:/data/mariadb-data mariadb-export.pxar:/data/mariadb-export --include-dev /data/nextcloud-html --include-dev /data/mariadb-data --include-dev /data/mariadb-export --backup-id "nextcloud-full" -ns cloud.limbosolutions.com && \
|
proxmox-backup-client backup nextcloud-html.pxar:/data/nextcloud-html mariadb-data.pxar:/data/mariadb-data mariadb-export.pxar:/data/mariadb-export --include-dev /data/nextcloud-html --include-dev /data/mariadb-data --include-dev /data/mariadb-export --backup-id "nextcloud-full" -ns cloud.limbosolutions.com && \
|
||||||
SCRIPT_DURATION=$(($(date +%s) - SCRIPT_START_TIME)) && \
|
SCRIPT_DURATION=$(($(date +%s) - SCRIPT_START_TIME)) && \
|
||||||
echo "INFO: Finished Backup of cloud.limbosolutions.com ($((SCRIPT_DURATION / 60 / 60)):$((SCRIPT_DURATION / 60)):$((SCRIPT_DURATION % 60)))"
|
echo "INFO: Finished Backup of cloud.limbosolutions.com ($((SCRIPT_DURATION / 60 / 60)):$((SCRIPT_DURATION / 60)):$((SCRIPT_DURATION % 60)))"
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: nextcloud-html
|
- name: nextcloud-html
|
||||||
mountPath: /data/nextcloud-html
|
mountPath: /data/nextcloud-html
|
||||||
|
- name: db-data
|
||||||
- name: db-data
|
mountPath: /data/mariadb-data
|
||||||
mountPath: /data/mariadb-data
|
- name: backup-var
|
||||||
|
mountPath: /tmp
|
||||||
- name: backup-var
|
subPath: tmp
|
||||||
mountPath: /tmp
|
- name: backup-var
|
||||||
subPath: tmp
|
mountPath: /data/mariadb-export
|
||||||
|
subPath: mariadb-export
|
||||||
- name: backup-var
|
|
||||||
mountPath: /data/mariadb-export
|
|
||||||
subPath: mariadb-export
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: nextcloud-html
|
- name: nextcloud-html
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: nextcloud-nextcloud
|
claimName: nextcloud-nextcloud
|
||||||
|
|
||||||
- name: db-data
|
- name: db-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: mariadb-data-nextcloud-mariadb-0
|
claimName: mariadb-data-nextcloud-mariadb-0
|
||||||
|
|
||||||
- name: backup-var
|
- name: backup-var
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user