1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
# Submitted by: Joachim Wiedorn (2011-02-20)
# example driver with modern xz compression. Please note, that
# the xz driver have quality 1...9, but only the first one should
# be used with backup2l (1, 2 or 3) because higher qualities are
# too slow for using for backup (Default quality of xz is "6").
# Use tar with the new driver XZ, here with the faster quality "3"
DRIVER_MY_TAR_XZ ()
{
case $1 in
-test)
require_tools tar xz-utils
echo "ok"
;;
-suffix)
echo "tar.xz"
;;
-create) # Arguments: $2 = BID, $3 = archive file, $4 = filelist file
tar -c -T $4 --no-recursion | xz -z -3 > $3 2>&1
;;
-toc) # Arguments: $2 = BID, $3 = archive file
tar -tJf $3 | sed 's#^#/#'
;;
-extract) # Arguments: $2 = BID, $3 = archive file, $4 = filelist file
tar -xJ --same-permission --same-owner -f $3 -T $4 2>&1
;;
esac
}
|