From b0a1c026efa1ec9c001a1077ffac7fdcdbe2ec71 Mon Sep 17 00:00:00 2001 From: micah Date: Wed, 15 Mar 2006 00:06:19 +0000 Subject: [PATCH] Harder than it looks at first! This appears to fix it, but please try it out. git-svn-id: http://code.autistici.org/svn/backupninja/trunk@371 758a04ac-41e6-0310-8a23-8373a73cc35d --- examples/example.dup | 14 -------------- examples/example.rdiff | 5 +---- examples/example.sys | 2 +- handlers/dup | 4 ++-- 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 -- 2.30.2