Skip to content
Snippets Groups Projects
Commit e94597ad authored by micah's avatar micah :speech_balloon:
Browse files

Harder than it looks at first! This appears to fix it, but please try it out.

parent 01379623
No related branches found
No related tags found
No related merge requests found
......@@ -55,20 +55,6 @@ password = a_very_complicated_passphrase
# 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
......
......@@ -35,10 +35,7 @@ keep = 60
# 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 '*')
......
......@@ -25,7 +25,7 @@
# 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
......
......@@ -118,15 +118,15 @@ set -o noglob
# 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
......
......@@ -174,15 +174,15 @@ set -o noglob
# 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment