X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Frdiff;h=10cb3c06d7523b4cf4cf219d4e64a1f9e782298d;hb=4e0c31d01627b9c01ff09841e1061f42750997f6;hp=ca97fa4da760d51447617236d0a713623d6b0ed4;hpb=1e410a6d9574c56b7d3a3633b82220eacf782d06;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/handlers/rdiff b/handlers/rdiff index ca97fa4..10cb3c0 100644 --- a/handlers/rdiff +++ b/handlers/rdiff @@ -26,7 +26,7 @@ getconf user; destuser=$user getconf host; desthost=$host # See if vservers are configured -if [ "$VSERVERS" = "yes" ] +if [ "$vservers" = "yes" ] then if [ ! -d $VROOTDIR ] then @@ -43,8 +43,8 @@ if [ "$desttype" == "remote" ]; then # see if we can login if [ "$testconnect" == "yes" ]; then hostalive=0 - debug "ssh -o PasswordAuthentication=no $desthost -l $destuser 'echo -n 1'" - ret=`ssh -o PasswordAuthentication=no $desthost -l $destuser 'echo -n host is alive'` + debug "ssh -o PreferredAuthentications=publickey $desthost -l $destuser 'echo -n 1'" + ret=`ssh -o PreferredAuthentications=publickey $desthost -l $destuser 'echo -n host is alive'` if echo $ret | grep "host is alive"; then debug "Connected to $desthost as $destuser successfully" else @@ -52,8 +52,8 @@ if [ "$desttype" == "remote" ]; then fi fi # see that rdiff-backup has the same version as here - debug "ssh $desthost -l $destuser '$RDIFFBACKUP -V'\"" - remoteversion=`ssh $desthost -l $destuser "$RDIFFBACKUP -V | grep rdiff-backup"` + debug "ssh -o PreferredAuthentications=publickey $desthost -l $destuser '$RDIFFBACKUP -V'\"" + remoteversion=`ssh -o PreferredAuthentications=publickey $desthost -l $destuser "$RDIFFBACKUP -V | grep rdiff-backup"` localversion=`$RDIFFBACKUP -V` if [ "$remoteversion" != "$localversion" ]; then fatal "rdiff-backup does not have the same version on this computer and the backup server." @@ -118,7 +118,7 @@ done # vsinclude if [ $usevserver ] then - for vserver in `ls $VROOTDIR|grep -v lost+found` + for vserver in `ls $VROOTDIR | grep -E -v "lost+found|ARCHIVES"` do for vi in $vsinclude do