Add backups
This commit is contained in:
parent
5abcac4177
commit
bc8c2f3179
2 changed files with 44 additions and 0 deletions
43
deployments/mariadb/backups.yaml
Normal file
43
deployments/mariadb/backups.yaml
Normal file
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mariadb-backup-pv
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: manual
|
||||
hostPath:
|
||||
path: /dpool/backups/mariadb
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mariadb-backup-pvc
|
||||
namespace: default
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: manual
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: k8s.mariadb.com/v1alpha1
|
||||
kind: Backup
|
||||
metadata:
|
||||
name: backup-scheduled
|
||||
namespace: home-server
|
||||
spec:
|
||||
mariaDbRef:
|
||||
name: nextcloud
|
||||
schedule:
|
||||
cron: "0 1 * * *"
|
||||
suspend: false
|
||||
maxRetention: 168h
|
||||
storage:
|
||||
persistentVolumeClaim:
|
||||
claimName: mariadb-backup-pvc
|
||||
logLevel: info
|
|
@ -4,3 +4,4 @@ kind: Kustomization
|
|||
|
||||
resources:
|
||||
- mariadb.yaml
|
||||
- backups.yaml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue