# if user or host is missing, returns the local version.
if [ "$#" -lt 2 ]; then
debug "$RDIFFBACKUP -V"
- echo `$RDIFFBACKUP -V | cut -d. -f1,2`
+ echo `$RDIFFBACKUP -V`
else
local user=$1
local host=$2
debug "ssh $sshoptions $host -l $user '$RDIFFBACKUP -V'"
- echo `ssh $sshoptions $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup | cut -d. -f1,2"`
+ echo `ssh $sshoptions $host -l $user "$RDIFFBACKUP -V | grep rdiff-backup"`
fi
}
getconf testconnect yes
getconf nicelevel 0
getconf bwlimit
+getconf ignore_version no
setsection source
getconf type; sourcetype=$type
getconf sshoptions
check_consistency "destination" "$type" "$user" "$host"
+if [ -n "$sshoptions" ] && echo $options | grep -qv "remote-schema"; then
+ options="$options --remote-schema 'ssh -C $sshoptions %s rdiff-backup --server'"
+fi
+
### CHECK CONFIG ###
# If vservers are configured, check that the ones listed in $vsnames do exist.
test_connection $destuser $desthost
fi
-# see that rdiff-backup has the same version at the source and destination
-sourceversion=`get_version $sourceuser $sourcehost`
-destversion=`get_version $destuser $desthost`
-if [ "$sourceversion" != "$destversion" ]; then
- fatal "rdiff-backup does not have the same version at the source and at the destination."
+if [ "$ignore_version" != "yes" ]; then
+ # see that rdiff-backup has the same version at the source and destination
+ sourceversion=`get_version $sourceuser $sourcehost`
+ destversion=`get_version $destuser $desthost`
+ if [ "$sourceversion" != "$destversion" ]; then
+ fatal "rdiff-backup does not have the same version at the source and at the destination."
+ fi
fi
# source specific checks
-[ "$include" != "" -o "$vsinclude" != "" ] || fatal "No source includes specified"
case $sourcetype in
remote ) execstr_sourcepart="$sourceuser@$sourcehost::/" ;;
local ) execstr_sourcepart="/" ;;
set +o noglob
# exclude everything else
-execstr="${execstr}--exclude '/*' "
+[ "$include" != "" -o "$vsinclude" != "" ] && execstr="${execstr}--exclude '/*' "
# include client-part and server-part
execstr="${execstr}$execstr_sourcepart $execstr_destpart"