# files to include in the backup
# (supports globbing with '*')
-# BIG FAT WARNING
-# Symlinks are not dereferenced. Moreover, an include line whose path
-# contains, at any level, a symlink to a directory, will only have the
-# symlink backed-up, not the target directory's content. Yes, you have
-# to dereference yourself the symlinks, or to use 'mount --bind'
-# instead.
-# EXAMPLE
-# Let's say /home is a symlink to /mnt/crypt/home ; the following line
-# will only backup a "/home" symlink ; neither /home/user nor
-# /home/user/Mail will be backed-up :
-# include = /home/user/Mail
-# A workaround is to 'mount --bind /mnt/crypt/home /home' ; another
-# one is to write :
-# include = /mnt/crypt/home/user/Mail
include = /var/spool/cron/crontabs
include = /var/backups
# a note about includes and excludes:
# All the excludes come after all the includes. The order is
-# not otherwise taken into account. Symlinks are backed up as
-# symlinks, they are not followed! This means you must specify
-# the real canonical path of a directory for it to actually
-# get included.
+# not otherwise taken into account.
# files to include in the backup
# (supports globbing with '*')
# packagesfile = /var/backups/dpkg-selections.txt
# partitions = yes
-# partitionsfile = /var/backups/partitions.__star__.txt
+# partitionsfile = /var/backups/partitions.*.txt
# hardware = yes
# hardwarefile = /var/backups/hardware.txt
# excludes
for i in $exclude; do
- i=`readlink -f $i`
str="${i//__star__/*}"
+ i=`readlink -f ${i#}`
execstr="${execstr}--exclude '$str' "
done
# includes
for i in $include; do
- i=`readlink -f $i`
str="${i//__star__/*}"
+ i=`readlink -f ${i#}`
execstr="${execstr}--include '$str' "
done
# TODO: order the includes and excludes
# excludes
for i in $exclude; do
- i=`readlink -f $i`
str="${i//__star__/*}"
+ i=`readlink -f ${i#}`
execstr="${execstr}--exclude '$str' "
done
# includes
for i in $include; do
[ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'"
- i=`readlink -f $i`
str="${i//__star__/*}"
+ i=`readlink -f $i`
execstr="${execstr}--include '$str' "
done