diff --git a/handlers/rsync.in b/handlers/rsync.in index 2620c471bb74d752964a194053afaadf52d1feaa..f0df52f588117b173b07cc787ff74bcc77d8c73e 100644 --- a/handlers/rsync.in +++ b/handlers/rsync.in @@ -1116,9 +1116,9 @@ for SECTION in $include; do set_dest info "Syncing $SECTION on $dest_path..." - debug $nice $rsync "${rsync_options[@]}" $filelist_flag $excludes $batch_option $orig $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 + $nice su -c "$rsync ${rsync_options[@]} --delete-excluded $filelist_flag $excludes $batch_option $orig $dest_path" | tee -a $log if [ "$?" != "0" ]; then fatal "Rsync error when trying to transfer $SECTION"