From b3c7693c1598b9fc2aef77fd707a4cd8bd466412 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 6 Nov 2014 11:46:03 -0200 Subject: Rsync handler patch from upstream #8196 --- files/handlers/rsync | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/handlers/rsync b/files/handlers/rsync index 634f036..7a78681 100644 --- a/files/handlers/rsync +++ b/files/handlers/rsync @@ -908,6 +908,10 @@ function set_filelist { function set_rsync_options { + if [ "$test" ]; then + rsync_options="$rsync_options --dry-run" + fi + if [ "$numericids" != "0" ]; then rsync_options="$rsync_options --numeric-ids" fi -- cgit v1.2.3 From b89122f4559b84aa70302ba8602dc3114479e343 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 7 Nov 2014 14:46:48 -0200 Subject: Rsync handler patch from upstream #8196 (2) --- files/handlers/rsync | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/handlers/rsync b/files/handlers/rsync index 7a78681..2b55c61 100644 --- a/files/handlers/rsync +++ b/files/handlers/rsync @@ -735,6 +735,10 @@ function move_files { function prepare_storage { + if [ "$test" ]; then + return + fi + section="`basename $SECTION`" if [ "$format" == "short" ]; then -- cgit v1.2.3 From 22d0f885bc9bed393bc27589afcc46f2cc647b5c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 7 Nov 2014 15:10:50 -0200 Subject: Rsync handler patch from upstream #8196 (3) --- files/handlers/rsync | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/files/handlers/rsync b/files/handlers/rsync index 2b55c61..f57cb5c 100644 --- a/files/handlers/rsync +++ b/files/handlers/rsync @@ -735,25 +735,24 @@ function move_files { function prepare_storage { - if [ "$test" ]; then - return - fi - section="`basename $SECTION`" if [ "$format" == "short" ]; then suffix="$section.0" - info "Rotating $backupdir/$SECTION..." - echo "Rotating $backupdir/$SECTION..." >> $log - if [ "$dest" == "remote" ]; then - rotate_short_remote $backupdir/$SECTION/$section $keep - else - rotate_short $backupdir/$SECTION/$section $keep - if [ ! -d "$backupdir/$SECTION/$section.0" ]; then - mkdir -p $backupdir/$SECTION/$section.0 - fi + if [ ! "$test" ]; then + info "Rotating $backupdir/$SECTION..." + echo "Rotating $backupdir/$SECTION..." >> $log + + if [ "$dest" == "remote" ]; then + rotate_short_remote $backupdir/$SECTION/$section $keep + else + rotate_short $backupdir/$SECTION/$section $keep + if [ ! -d "$backupdir/$SECTION/$section.0" ]; then + mkdir -p $backupdir/$SECTION/$section.0 + fi + fi fi elif [ "$format" == "long" ]; then @@ -769,15 +768,18 @@ function prepare_storage { fi suffix="$btype.1" - info "Rotating $backupdir/$SECTION/..." - echo "Rotating $backupdir/$SECTION/..." >> $log - if [ "$dest" == "remote" ]; then - rotate_long_remote $backupdir/$SECTION - setup_long_dirs_remote $backupdir/$SECTION $btype - else - rotate_long $backupdir/$SECTION - setup_long_dirs $backupdir/$SECTION $btype + if [ ! "$test" ]; then + info "Rotating $backupdir/$SECTION/..." + echo "Rotating $backupdir/$SECTION/..." >> $log + + if [ "$dest" == "remote" ]; then + rotate_long_remote $backupdir/$SECTION + setup_long_dirs_remote $backupdir/$SECTION $btype + else + rotate_long $backupdir/$SECTION + setup_long_dirs $backupdir/$SECTION $btype + fi fi elif [ "$format" == "mirror" ]; then -- cgit v1.2.3