# Pipe the stuff over ssh to ourselves, run pee to cat the contents to a
# file and build a file list, respectivly.
TARFILE=$DATE.tmp
- TARCMD="ssh -n $username@$computer \"nice -n 19 ionice -c3 tar --one-file-system --use-compress-program $compressor -cf - -C $filesystem . $lastcmd \
+ TARCMD="ssh -n $username@$computer \"$nice tar --one-file-system --use-compress-program $compressor -cf - -C $filesystem . $lastcmd \
--exclude-from=$remotehome/.backup/exclude\" | pee \"$storageprogram > $TARFILE\" \"tar tzvf -\""
infomsg "Running $TARCMD"
eval $TARCMD > $DATE.idx
compressor=gzip
fi
+# Check if nice and ionice are available
+if ssh -n $username@$computer "nice -n 19 ionice -c3 /bin/true 2>/dev/null"; then
+ nice="nice -n 19 ionice -c3"
+else
+ infomsg "nice and/or ionice missing; will run at normal priority."
+ nice=""
+fi
+
# Check dump bit in fstab
filesystems=`ssh -n $username@$computer "cat /etc/fstab" \
| grep -v nfs \