github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/mongodb/templates/actionset-datafile.yaml (about) 1 apiVersion: dataprotection.kubeblocks.io/v1alpha1 2 kind: ActionSet 3 metadata: 4 name: mongodb-physical-backup 5 labels: 6 clusterdefinition.kubeblocks.io/name: mongodb 7 {{- include "mongodb.labels" . | nindent 4 }} 8 spec: 9 env: 10 - name: DATA_DIR 11 value: {{ .Values.dataMountPath }}/db 12 backupType: Full 13 backup: 14 preBackup: [] 15 postBackup: [] 16 backupData: 17 image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} 18 runOnTargetPodNode: true 19 syncProgress: 20 enabled: true 21 intervalSeconds: 5 22 command: 23 - bash 24 - -c 25 - | 26 {{- .Files.Get "dataprotection/backup-info-collector.sh" | nindent 8 }} 27 {{- .Files.Get "dataprotection/datafile-backup.sh" | nindent 8 }} 28 29 restore: 30 prepareData: 31 image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} 32 command: 33 - bash 34 - -c 35 - | 36 {{- .Files.Get "dataprotection/datafile-restore.sh" | nindent 8 }} 37 postReady: [] 38 --- 39 apiVersion: dataprotection.kubeblocks.io/v1alpha1 40 kind: ActionSet 41 metadata: 42 name: mongodb-volumesnapshot 43 labels: 44 clusterdefinition.kubeblocks.io/name: apecloud-mysql 45 spec: 46 backupType: Full 47 env: 48 - name: DATA_DIR 49 value: {{ .Values.dataMountPath }}/db 50 backup: {} 51 restore: 52 prepareData: 53 image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} 54 command: 55 - bash 56 - -c 57 - "touch ${DATA_DIR}/mongodb.backup; sync" 58 postReady: []