diff --git a/deploy/mongodb/templates/actionset-datafile.yaml b/deploy/mongodb/templates/actionset-datafile.yaml index 3f500d26fec..75c48af53ae 100644 --- a/deploy/mongodb/templates/actionset-datafile.yaml +++ b/deploy/mongodb/templates/actionset-datafile.yaml @@ -30,7 +30,7 @@ spec: prepareData: image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} command: - - sh + - bash - -c - | {{- .Files.Get "dataprotection/datafile-restore.sh" | nindent 8 }} @@ -52,7 +52,7 @@ spec: prepareData: image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} command: - - sh + - bash - -c - "touch ${DATA_DIR}/mongodb.backup; sync" postReady: [] \ No newline at end of file diff --git a/deploy/mongodb/templates/actionset-dump.yaml b/deploy/mongodb/templates/actionset-dump.yaml index 97ac4a868a8..bc18b8ea186 100644 --- a/deploy/mongodb/templates/actionset-dump.yaml +++ b/deploy/mongodb/templates/actionset-dump.yaml @@ -33,7 +33,7 @@ spec: image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} runOnTargetPodNode: false command: - - sh + - bash - -c - | {{- .Files.Get "dataprotection/mongodump-restore.sh" | nindent 10 }} \ No newline at end of file diff --git a/deploy/qdrant/scripts/qdrant-restore.sh b/deploy/qdrant/scripts/qdrant-restore.sh index a913679febe..809a32ee82a 100644 --- a/deploy/qdrant/scripts/qdrant-restore.sh +++ b/deploy/qdrant/scripts/qdrant-restore.sh @@ -18,10 +18,15 @@ mkdir -p "${SNAPSHOT_DIR}" datasafed pull "${SNAPSHOT_FILE}" "${SNAPSHOT_DIR}/${SNAPSHOT_FILE}" # start qdrant restore process -qdrant --storage-snapshot "${SNAPSHOT_DIR}/${SNAPSHOT_FILE}" --config-path /qdrant/config/config.yaml --force-snapshot --uri http://localhost:6333 & +/qdrant/qdrant --storage-snapshot "${SNAPSHOT_DIR}/${SNAPSHOT_FILE}" --config-path /qdrant/config/config.yaml --force-snapshot --uri http://localhost:6333 2>&1 | tee "${DATA_DIR}/restore.log" & # wait until restore finished -until curl http://localhost:6333/cluster; do sleep 1; done +# note: if we have curl, we can detect it this way +# until curl http://localhost:6333/cluster; do sleep 1; done +until grep -q "Qdrant HTTP listening on" "${DATA_DIR}/restore.log"; do + sleep 1 +done +rm "${DATA_DIR}/restore.log" # restore finished, we can kill the restore process now pid=`pidof qdrant` diff --git a/deploy/qdrant/templates/actionset-datafile.yaml b/deploy/qdrant/templates/actionset-datafile.yaml index 6ea586031b4..e668b47dc7f 100644 --- a/deploy/qdrant/templates/actionset-datafile.yaml +++ b/deploy/qdrant/templates/actionset-datafile.yaml @@ -14,9 +14,10 @@ spec: preBackup: [] postBackup: [] backupData: - image: apecloud/curl-jq:latest + image: {{ .Values.images.registry | default "docker.io" }}/{{ .Values.images.tools.repository}}:{{ .Values.images.tools.tag | default "latest" }} runOnTargetPodNode: false command: + # no bash available in the image - sh - -c - | @@ -26,9 +27,9 @@ spec: intervalSeconds: 5 restore: prepareData: - image: apecloud/curl-jq:latest + image: {{ .Values.images.registry | default "docker.io" }}/{{ .Values.images.repository}}:{{ include "qdrant.version" . | default .Values.images.tag }} command: - - sh + - bash - -c - | {{- .Files.Get "scripts/qdrant-restore.sh" | nindent 8 }}