Skip to content
Snippets Groups Projects
Commit 3094b04d authored by rhatto's avatar rhatto
Browse files

Rsync: check test mode should set proper dest path (#8196)

parent 89860aa3
No related branches found
No related tags found
No related merge requests found
...@@ -747,15 +747,13 @@ function move_files { ...@@ -747,15 +747,13 @@ function move_files {
function prepare_storage { function prepare_storage {
if [ "$test" ]; then
return
fi
section="`basename $SECTION`" section="`basename $SECTION`"
if [ "$format" == "short" ]; then if [ "$format" == "short" ]; then
suffix="$section.0" suffix="$section.0"
if [ ! "$test" ]; then
info "Rotating $backupdir/$SECTION..." info "Rotating $backupdir/$SECTION..."
echo "Rotating $backupdir/$SECTION..." >> $log echo "Rotating $backupdir/$SECTION..." >> $log
...@@ -767,6 +765,7 @@ function prepare_storage { ...@@ -767,6 +765,7 @@ function prepare_storage {
mkdir -p $backupdir/$SECTION/$section.0 mkdir -p $backupdir/$SECTION/$section.0
fi fi
fi fi
fi
elif [ "$format" == "long" ]; then elif [ "$format" == "long" ]; then
...@@ -781,6 +780,8 @@ function prepare_storage { ...@@ -781,6 +780,8 @@ function prepare_storage {
fi fi
suffix="$btype.1" suffix="$btype.1"
if [ ! "$test" ]; then
info "Rotating $backupdir/$SECTION/..." info "Rotating $backupdir/$SECTION/..."
echo "Rotating $backupdir/$SECTION/..." >> $log echo "Rotating $backupdir/$SECTION/..." >> $log
...@@ -791,6 +792,7 @@ function prepare_storage { ...@@ -791,6 +792,7 @@ function prepare_storage {
rotate_long $backupdir/$SECTION rotate_long $backupdir/$SECTION
setup_long_dirs $backupdir/$SECTION $btype setup_long_dirs $backupdir/$SECTION $btype
fi fi
fi
elif [ "$format" == "mirror" ]; then elif [ "$format" == "mirror" ]; then
suffix="" suffix=""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment