aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-05-12 21:48:43 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-05-12 21:48:43 -0300
commit118d7587b6d4ad34224b7bf7370bdfbe941ffe3c (patch)
tree3b84f4710ba9d3826ee494a318746792d6f632cc /handlers
parentfbf25018bea6b5cb630ee15b401b385d5e9f7084 (diff)
downloadbackupninja-118d7587b6d4ad34224b7bf7370bdfbe941ffe3c.tar.gz
backupninja-118d7587b6d4ad34224b7bf7370bdfbe941ffe3c.tar.bz2
Changing pipefail just when it's really needed
Diffstat (limited to 'handlers')
-rw-r--r--handlers/rsync.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/handlers/rsync.in b/handlers/rsync.in
index 85e1c99..1f7fb4d 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -1131,7 +1131,6 @@ set_rsync_options
start_mux
stop_services
mount_rw
-set_pipefail
starttime="`date +%c%n%s`"
echo "Starting backup at `echo $starttime | head -n 1`" >> $log
@@ -1146,17 +1145,18 @@ for SECTION in $include; do
info "Syncing $SECTION on $dest_path..."
debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path
+ set_pipefail
$nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $dest_path | tee -a $log
if [ "$?" != "0" ]; then
fatal "Rsync error when trying to transfer $SECTION"
fi
+ restore_pipefail
update_metadata
done
-restore_pipefail
mount_ro
run_fsck
start_services