From 812d190458fa5b5e253e378a9e48fb08a808aef8 Mon Sep 17 00:00:00 2001 From: "yabin.ji" Date: Sun, 7 Apr 2024 18:09:58 +0800 Subject: [PATCH] temp: add pitr logic --- .../mogdb/templates/actionset-brm-full.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 addons/mogdb/templates/actionset-brm-full.yaml diff --git a/addons/mogdb/templates/actionset-brm-full.yaml b/addons/mogdb/templates/actionset-brm-full.yaml new file mode 100644 index 000000000..26ccd8286 --- /dev/null +++ b/addons/mogdb/templates/actionset-brm-full.yaml @@ -0,0 +1,58 @@ +apiVersion: dataprotection.kubeblocks.io/v1alpha1 +kind: ActionSet +metadata: + name: mogdb-brm-full + labels: + clusterdefinition.kubeblocks.io/name: mogdb + {{- include "mogdb.labels" . | nindent 4 }} +spec: + backupType: Full + env: + - name: DATA_DIR + value: {{ .Values.dataMountPath }}/mogdb/data + - name: IMAGE_TAG + value: 5.0.5 + - name: GAUSSHOME + value: /usr/local/mogdb + - name: LD_LIBRARY_PATH + value: /usr/local/mogdb/lib + - name: PATH + value: /usr/local/mogdb/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + - name: PGPORT + value: "26000" + - name: PGHOST + value: /var/lib/mogdb/tmp + - name: SSH_RSA + valueFrom: + secretKeyRef: + name: mogdb-ssh-rsa-secret + key: id_rsa + backup: + preBackup: [] + postBackup: [] + backupData: + image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:$(IMAGE_TAG) + runOnTargetPodNode: true + command: + - bash + - -c + - | + set -x + {{- .Files.Get "scripts/library.sh" | nindent 8 }} + {{- .Files.Get "dataprotection/ssh.sh" | nindent 8 }} + {{- .Files.Get "dataprotection/brm-info-collector.sh" | nindent 8 }} + {{- .Files.Get "dataprotection/brm-common.sh" | nindent 8 }} + {{- .Files.Get "dataprotection/brm-full-backup.sh" | nindent 8 }} + syncProgress: + enabled: true + intervalSeconds: 5 + restore: + prepareData: + image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:$(IMAGE_TAG) + command: + - bash + - -c + - | + set -x + {{- .Files.Get "dataprotection/brm-full-restore.sh" | nindent 8 }} + postReady: []