]> hackdaworld.org Git - outofuni/backup.git/commitdiff
more verbose output in case of errors
authorhackbard <hackbard@hackdaworld.org>
Thu, 24 Mar 2016 11:51:53 +0000 (12:51 +0100)
committerhackbard <hackbard@hackdaworld.org>
Thu, 24 Mar 2016 11:51:53 +0000 (12:51 +0100)
bin/backup

index cd96256c5e8b0d102ea6db675e6bbb599f4a0e87..b29d2b7a0a1cbc2a3c63d4ba81eafaf2f8717f53 100755 (executable)
@@ -161,11 +161,13 @@ if [ ! -f $backupdir/.$today ]; then
                rsync=(rsync -aR -e "ssh -c $ciph" $rcomp --delete)
                rsync+=($rbw $user@$remote$rsrc $cbd)
        fi
-       "${rsync[@]}"
+       res=`"${rsync[@]}" 2>&1`
 
        ret=$?
        if [ "$ret" != "0" ]; then
                log backup terminated before completion ...
+               log reason:
+               log $res
                exit -50
        fi