File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # ===================== v0.33 - 2025.08.14 ========================
2
+ # ===================== v0.33 - 2025.08.15 ========================
3
3
#
4
4
# Example backup.conf:
5
5
# BACKUP_DIRS="/home/user/test/./ /var/www/./"
@@ -366,8 +366,10 @@ run_restore_mode() {
366
366
local date_folders=()
367
367
local remote_recycle_path=" ${BOX_DIR%/ } /${RECYCLE_BIN_DIR%/ } "
368
368
mapfile -t date_folders < <( ssh " ${SSH_OPTS_ARRAY[@]} " " ${SSH_DIRECT_OPTS[@]} " " $BOX_ADDR " " ls -1 \" $remote_recycle_path \" " 2> /dev/null | grep -E ' ^[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{6}$' )
369
- if [[ ${# date_folders[@]} -eq 0 ]]; then
370
- fi
369
+ if [[ ${# date_folders[@]} -eq 0 ]]; then
370
+ printf " ${C_YELLOW} ❌ The remote recycle bin is empty or contains no valid backup folders.${C_RESET} \n"
371
+ return 1
372
+ fi
371
373
printf " ${C_YELLOW} Select a backup run (date_time) to browse:${C_RESET} \n"
372
374
PS3=" Your choice: "
373
375
select date_choice in " ${date_folders[@]} " " Cancel" ; do
@@ -694,7 +696,8 @@ for dir in "${DIRS_ARRAY[@]}"; do
694
696
RSYNC_EXIT_CODE=${PIPESTATUS[0]}
695
697
else
696
698
RSYNC_OPTS+=(--info=stats2)
697
- nice -n 19 ionice -c 3 rsync " ${RSYNC_OPTS[@]} " " $dir " " $REMOTE_TARGET " > " $RSYNC_LOG_TMP " 2>&1 || RSYNC_EXIT_CODE=$?
699
+ nice -n 19 ionice -c 3 rsync " ${RSYNC_OPTS[@]} " " $dir " " $REMOTE_TARGET " > " $RSYNC_LOG_TMP " 2>&1
700
+ RSYNC_EXIT_CODE=$?
698
701
fi
699
702
cat " $RSYNC_LOG_TMP " >> " $LOG_FILE " ; full_rsync_output+=$' \n ' " $( < " $RSYNC_LOG_TMP " ) "
700
703
rm -f " $RSYNC_LOG_TMP "
You can’t perform that action at this time.
0 commit comments