Skip to content

Commit 4623785

Browse files
author
Sven Speckmaier
committed
fix: use BACKUP_PATH-inc1 to copy the incremental backup to
1 parent 48e3b43 commit 4623785

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

entrypoint

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ restore_incremental() {
352352
local BACKUP_NAME="$2"
353353
local RESTORE_DIRECTORY="$3"
354354
local BACKUP_PATH="${BACKUP_DIRECTORY}/${BACKUP_NAME}"
355-
local TEMPORARY_BACKUP_PATH="/tmp/${BACKUP_NAME}"
355+
local BACKUP_INCREMENT_PATH="${BACKUP_PATH}-inc1"
356356

357357
echo "======================================================================"
358358
echo "= Incremental full backup ${BACKUP_PATH}"
@@ -378,15 +378,15 @@ restore_incremental() {
378378
# medium which might not allow such access
379379
#
380380
echo "Copying incremental Backup"
381-
cp -Rfv "${BACKUP_PATH}" "${TEMPORARY_BACKUP_PATH}"
381+
cp -Rfv "${BACKUP_PATH}" "${BACKUP_INCREMENT_PATH}"
382382

383383
# Prepare the full backup
384384
echo "Preparing ${BASE_BACKUP_NAME}"
385385
xtrabackup --prepare --apply-log-only --target-dir="$RESTORE_DIRECTORY"
386386

387387
# apply the incremental backup
388388
echo "Preparing ${BACKUP_NAME}"
389-
xtrabackup --prepare --target-dir="$RESTORE_DIRECTORY" --incremental-dir="${TEMPORARY_BACKUP_PATH}"
389+
xtrabackup --prepare --target-dir="$RESTORE_DIRECTORY" --incremental-dir="${BACKUP_INCREMENT_PATH}"
390390

391391
echo "Done preparing"
392392
# copying back the prepared directory to the data directory is done in restore() as it is a shared step

0 commit comments

Comments
 (0)