From: Micah Anderson Date: Sat, 11 Mar 2006 07:21:04 +0000 (+0000) Subject: If you include= or exclude= a directory that is actually a symlink X-Git-Tag: backupninja-0.9.4~76 X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=commitdiff_plain;h=dc8e99c6c42a6f6bed025132aee37f4a742f6d0d If you include= or exclude= a directory that is actually a symlink somewhere along the chain you will only backup the symlink, and not the data, this is fixed here in rdiff with this change --- diff --git a/ChangeLog b/ChangeLog index aec8d97..a6fb5e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ version 0.9.4 -- unreleased mysql: . Fixed improper use of $vuserhome (Debian: #351083) . Fixed erroneous removal of tmpfile when it didn't exit + rdiff: + . Fixed improper include/exclude symlink dereference lib changes vserver: . init_vservers: fixed Debian bug #351083 (improper readlink syntax) diff --git a/handlers/rdiff b/handlers/rdiff index 4871d4e..6cbe6fa 100644 --- a/handlers/rdiff +++ b/handlers/rdiff @@ -174,12 +174,14 @@ set -o noglob # TODO: order the includes and excludes # excludes for i in $exclude; do + i=`readlink -f $i` str="${i//__star__/*}" 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__/*}" execstr="${execstr}--include '$str' " done @@ -188,7 +190,8 @@ done if [ $usevserver = yes ]; then for vserver in $vsnames; do for vi in $vsinclude; do - str="${vi//__star__/*}" + i=`readlink -f $VROOTDIR/$vserver$vi` + str="${i//__star__/*}" execstr="${execstr}--include '$VROOTDIR/$vserver$str' " done done