diff --git a/addons/zookeeper/dataprotection/backup.sh b/addons/zookeeper/dataprotection/backup.sh index 6a1e82441..e149386ba 100644 --- a/addons/zookeeper/dataprotection/backup.sh +++ b/addons/zookeeper/dataprotection/backup.sh @@ -2,6 +2,8 @@ set -e set -o pipefail export PATH="$PATH:$DP_DATASAFED_BIN_PATH" +export DATASAFED_BACKEND_BASE_PATH="$DP_BACKUP_BASE_PATH" + # if the script exits with a non-zero exit code, touch a file to indicate that the backup failed, # the sync progress container will check this file and exit if it exists function handle_exit() { @@ -15,7 +17,7 @@ function handle_exit() { trap handle_exit EXIT java -cp /zoocreeper.jar com.boundary.zoocreeper.Backup \ --z ${DP_DB_HOST}:${MY_ZOOKEEPER_ZOOKEEPER_SERVICE_PORT_CLIENT} --compress | \ +-z ${DP_DB_HOST}:${ZK_CLIENT_PORT} --compress | \ datasafed push -z zstd-fastest - "${DP_BACKUP_NAME}.backup.json" TOTAL_SIZE=$(datasafed stat / | grep TotalSize | awk '{print $2}') diff --git a/addons/zookeeper/dataprotection/restore.sh b/addons/zookeeper/dataprotection/restore.sh index 430b6522d..aabc289d4 100644 --- a/addons/zookeeper/dataprotection/restore.sh +++ b/addons/zookeeper/dataprotection/restore.sh @@ -12,7 +12,7 @@ datasafed pull -d zstd-fastest "${backupFileName}" ${TMP_DIR}/backup.json touch ${ZOOKEEPER_DATA_DIR}/.restore_new_cluster java -cp /zoocreeper.jar com.boundary.zoocreeper.Restore \ --z ${KB_CLUSTER_COMP_NAME}:${DP_DB_PORT} -f ${TMP_DIR}/backup.json \ +-z ${DP_DB_HOST}:${ZK_CLIENT_PORT} -f ${TMP_DIR}/backup.json \ --overwrite-existing --compress --exclude /zookeeper/config* rm -rf ${TMP_DIR} diff --git a/addons/zookeeper/templates/backupactionset.yaml b/addons/zookeeper/templates/backupactionset.yaml index 4533bd960..a3b7524d5 100644 --- a/addons/zookeeper/templates/backupactionset.yaml +++ b/addons/zookeeper/templates/backupactionset.yaml @@ -6,6 +6,9 @@ metadata: {{- include "zookeeper.labels" . | nindent 4 }} spec: backupType: Full + env: + - name: ZK_CLIENT_PORT + value: "2181" backup: backupData: image: {{ .Values.images.zoocreeper.registry | default (.Values.images.registry | default "docker.io") }}/{{ .Values.images.zoocreeper.repository }}:{{ .Values.images.zoocreeper.tag }}