50-drivers.conf 902 Bytes
Newer Older
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
# Modified/updated driver from default backup2l.conf file, which doesn't
# raise warnings from tar. Note that this also don't update the access
# time, which is useful.


# The following driver is equivalent to the built-in DRIVER_TAR_GZ driver, but
# does not change the access times of the original files during backup
# (Adrian Bunk, Gundolf Kiefer)
DRIVER_TAR_GZ ()
{
    case $1 in
        -test)
            require_tools tar
            echo "ok"
            ;;
        -suffix)
            echo "tar.gz"
            ;;
        -create)        # Arguments: $2 = BID, $3 = archive file name, $4 = file list file
            tar czf $3 --no-recursion -T $4 --atime-preserve 2>&1 \
                | grep -v 'tar: Removing leading .* from .* names'
            ;;
        -toc)           # Arguments: $2 = BID, $3 = archive file name
            tar tzf $3 | sed 's#^#/#'
            ;;
    esac
}