diff options
author | Micah Anderson <micah@riseup.net> | 2006-03-15 00:06:19 +0000 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2006-03-15 00:06:19 +0000 |
commit | e94597ad053204c0a056505fe3f017ff325489fd (patch) | |
tree | 11bbc5cece415b99ceaf8733866b936833d5defa | |
parent | 0137962360bd449b4699e06bc9fad6285492f3a9 (diff) | |
download | backupninja-e94597ad053204c0a056505fe3f017ff325489fd.tar.gz backupninja-e94597ad053204c0a056505fe3f017ff325489fd.tar.bz2 |
Harder than it looks at first! This appears to fix it, but please try it out.
-rw-r--r-- | examples/example.dup | 14 | ||||
-rw-r--r-- | examples/example.rdiff | 5 | ||||
-rw-r--r-- | examples/example.sys | 2 | ||||
-rw-r--r-- | handlers/dup | 4 | ||||
-rw-r--r-- | handlers/rdiff | 4 |
5 files changed, 6 insertions, 23 deletions
diff --git a/examples/example.dup b/examples/example.dup index e6a66a8..a5c1b67 100644 --- a/examples/example.dup +++ b/examples/example.dup @@ -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 diff --git a/examples/example.rdiff b/examples/example.rdiff index 198516c..da39329 100644 --- a/examples/example.rdiff +++ b/examples/example.rdiff @@ -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 '*') diff --git a/examples/example.sys b/examples/example.sys index 9ebd4b2..a05726b 100644 --- a/examples/example.sys +++ b/examples/example.sys @@ -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 diff --git a/handlers/dup b/handlers/dup index 227ba8b..1f54652 100644 --- a/handlers/dup +++ b/handlers/dup @@ -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 diff --git a/handlers/rdiff b/handlers/rdiff index 6cbe6fa..4aebfd3 100644 --- a/handlers/rdiff +++ b/handlers/rdiff @@ -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 |