getconf host; desthost=$host
# See if vservers are configured
-if [ "$VSERVERS" = "yes" ]
+if [ "$vservers" = "yes" ]
then
if [ ! -d $VROOTDIR ]
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
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."
### SOURCE ###
-[ "$label" != "" ] || fatal "Source missing label"
[ "$sourcetype" == "local" ] || fatal "Only local source type supported"
[ "$include" != "" -o "$vsinclude" != "" ] || fatal "No source includes specified"
#TODO should I test for vsinclude if usevservers=1?
# 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
code=$?
if [ "$code" == "0" ]; then
debug $output
- info "Successfully finished backing up source '$label'"
+ info "Successfully finished backing up source $label"
else
warning $output
- warning "Failed backup up source '$label'"
+ warning "Failed backup up source $label"
fi
fi