# a GPG command line.
storageprogram=$( findconf storageprogram $computer $sfilesystem )
+ # Find compressor and decompressor for this filesystem.
+ fscompressor=$( findconf compressor $computer $filesystem )
+ if [ -z "$fscompressor" ]; then
+ fscompressor=$compressor
+ fi
+ decompressor=$( findconf decompressor $computer $filesystem )
+
# We try to run tar on the remote computer
# c create archive
# C change to directory first
# 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 tar --one-file-system --use-compress-program $compressor -cf - -C $filesystem . $lastcmd \
- --exclude-from=$remotehome/.backup/exclude\" | pee \"$storageprogram > $TARFILE\" \"tar tzvf -\""
+ TARCMD="ssh -n $username@$computer \"$nice tar --one-file-system --use-compress-program $fscompressor -cf - -C $filesystem . $lastcmd \
+ --exclude-from=$remotehome/.backup/exclude\" | pee \"$storageprogram > $TARFILE\" \"$decompressor | tar tvf -\""
infomsg "Running $TARCMD"
eval $TARCMD > $DATE.idx
diemsg "Could not expand ~ for user $username"
fi
-# Check if pigz is available
-if ssh -n $username@$computer "pigz -V 2>/dev/null"; then
- compressor=pigz
-else
- infomsg "pigz missing; falling back to gzip."
- compressor=gzip
+# Check if pigz is available. Note that this may be overridden per-filesystem later.
+compressor=$( findconf compressor $computer )
+if [ -z "$compressor" ]; then
+ if ssh -n $username@$computer "pigz -V 2>/dev/null"; then
+ compressor=pigz
+ else
+ infomsg "pigz missing; falling back to gzip."
+ compressor=gzip
+ fi
fi
# Check if nice and ionice are available