fi
}
+function check_cstream() {
+ local cstream=$1
+ if [ ! -x $cstream ]; then
+ fatal "Can't find your cstream binary (trying: $cstream). If you use bwlimit you must have cstream installed."
+ fi
+}
+
### GET CONFIG ###
getconf options
getconf testconnect yes
getconf nicelevel 0
+getconf bwlimit
setsection source
getconf type; sourcetype=$type
fi
fi
+# Add cstream
+
+if [ ! -z $bwlimit ]; then
+ check_cstream $CSTREAM;
+ if [ "$desttype" = "remote" ]; then
+ RDIFFBACKUP="$RDIFFBACKUP --remote-schema 'cstream -t $bwlimit | ssh %s \''rdiff-backup --server\'''"
+ elif [ "$sourcetype" = "remote" ]; then
+ RDIFFBACKUP="$RDIFFBACKUP --remote-schema 'ssh %s \''rdiff-backup --server\'' | cstream -t $bwlimit'"
+ else
+ fatal "You specified a bandwidth limit but neither your source nor destination types are remote."
+ fi
+fi
+
### EXECUTE ###
execstr="$RDIFFBACKUP $options --print-statistics "
# excludes
for i in $exclude; do
str="${i//__star__/*}"
- str=`readlink -f $str`
- if [ -n "$str" ]; then
- execstr="${execstr}--exclude '$str' "
- else
- warning "exclude statement '${i//__star__/*}' will be ignored. $symlinks_warning"
- fi
+ execstr="${execstr}--exclude '$str' "
done
# includes
for i in $include; do
[ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'"
str="${i//__star__/*}"
- str=`readlink -f $str`
- if [ -n "$str" ]; then
- execstr="${execstr}--include '$str' "
- else
- warning "include statement '${i//__star__/*}' will be ignored. $symlinks_warning"
- fi
+ execstr="${execstr}--include '$str' "
done
# vsinclude
for vserver in $vsnames; do
for vi in $vsinclude; do
str="${vi//__star__/*}"
- str=`readlink -f $VROOTDIR/$vserver$str`
+ str="$VROOTDIR/$vserver$str"
if [ -n "$str" ]; then
execstr="${execstr}--include '$str' "
else