Skip to content

Commit

Permalink
based on comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gnolong committed Jan 6, 2025
1 parent 2125d74 commit 453107a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ fi

# 2. get parent backup
mkdir -p ${DATA_DIR}
PARENT_DIR=${DATA_MOUNT_DIR}/parent
PARENT_DIR=${DATA_MOUNT_DIR}/xtrabackup-parent
rm -rf ${PARENT_DIR}
mkdir -p ${PARENT_DIR} && cd ${PARENT_DIR}
# set the datasafed backend base path for the parent backup
export DATASAFED_BACKEND_BASE_PATH="${DP_BACKUP_ROOT_PATH}/${DP_PARENT_BACKUP_NAME}/${DP_TARGET_RELATIVE_PATH}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ fi
# 2. download backup files
# download base backup file
mkdir -p ${DATA_DIR}
BASE_DIR=${DATA_MOUNT_DIR}/base
BASE_DIR=${DATA_MOUNT_DIR}/xtrabackup-base
download_backup_file "${DP_BASE_BACKUP_NAME}" "${BASE_DIR}"
# download parent backup files
if [ -n "${DP_ANCESTOR_INCREMENTAL_BACKUP_NAMES}" ]; then
read -r -a ANCESTOR_INCREMENTAL_BACKUP_NAMES <<< "${DP_ANCESTOR_INCREMENTAL_BACKUP_NAMES//,/ }"
fi
INCS_DIR=${DATA_MOUNT_DIR}/incs
INCS_DIR=${DATA_MOUNT_DIR}/xtrabackup-incs
mkdir -p ${INCS_DIR}
for parent_name in "${ANCESTOR_INCREMENTAL_BACKUP_NAMES[@]}"; do
download_backup_file "${parent_name}" "${INCS_DIR}/${parent_name}"
Expand Down
3 changes: 2 additions & 1 deletion addons/mysql/dataprotection/xtrabackup-incremental-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ fi

# 2. get parent backup
mkdir -p ${DATA_DIR}
PARENT_DIR=${DATA_MOUNT_DIR}/parent
PARENT_DIR=${MYSQL_DIR}/xtrabackup-parent
rm -rf ${PARENT_DIR}
mkdir -p ${PARENT_DIR} && cd ${PARENT_DIR}
# set the datasafed backend base path for the parent backup
export DATASAFED_BACKEND_BASE_PATH="${DP_BACKUP_ROOT_PATH}/${DP_PARENT_BACKUP_NAME}/${DP_TARGET_RELATIVE_PATH}"
Expand Down
4 changes: 2 additions & 2 deletions addons/mysql/dataprotection/xtrabackup-incremental-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ fi
# 2. download backup files
# download base backup file
mkdir -p ${DATA_DIR}
BASE_DIR=${DATA_MOUNT_DIR}/base
BASE_DIR=${MYSQL_DIR}/xtrabackup-base
download_backup_file "${DP_BASE_BACKUP_NAME}" "${BASE_DIR}"
# download parent backup files
if [ -n "${DP_ANCESTOR_INCREMENTAL_BACKUP_NAMES}" ]; then
read -r -a ANCESTOR_INCREMENTAL_BACKUP_NAMES <<< "${DP_ANCESTOR_INCREMENTAL_BACKUP_NAMES//,/ }"
fi
INCS_DIR=${DATA_MOUNT_DIR}/incs
INCS_DIR=${MYSQL_DIR}/xtrabackup-incs
mkdir -p ${INCS_DIR}
for parent_name in "${ANCESTOR_INCREMENTAL_BACKUP_NAMES[@]}"; do
download_backup_file "${parent_name}" "${INCS_DIR}/${parent_name}"
Expand Down

0 comments on commit 453107a

Please sign in to comment.