Harder than it looks at first! This appears to fix it, but please try it out.
authormicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Wed, 15 Mar 2006 00:06:19 +0000 (00:06 +0000)
committermicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Wed, 15 Mar 2006 00:06:19 +0000 (00:06 +0000)
git-svn-id: http://code.autistici.org/svn/backupninja/trunk@371 758a04ac-41e6-0310-8a23-8373a73cc35d

examples/example.dup
examples/example.rdiff
examples/example.sys
handlers/dup
handlers/rdiff

index e6a66a87e3a3e5107a790823eba0f657a20a69d3..a5c1b67802824ba561aebcac0bd02172f86d101d 100644 (file)
@@ -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
index 198516c726cdc15339d4ede7c6b5d29dc3d29bc6..da3932913e363f806502e975366f7df0921e2e19 100644 (file)
@@ -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 '*')
index 9ebd4b22e7d635b66b42c372ce09e8a1b5dbeeb8..a05726b0482905da0aa35bbc17c9ec3fe2d880c8 100644 (file)
@@ -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
index 227ba8bcf11f1edc90b0dd71d696ef6ea46ee52d..1f54652175563ace7191bfc9e7ddeee2870cf975 100644 (file)
@@ -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
 
index 6cbe6faf48ba8cc3a9a2687ede8931185a30af93..4aebfd326e8b03bbb6b44fe0ec976346578bd47d 100644 (file)
@@ -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