I'm not sure if I was relying on unspecified behavior, but I was in the habit of putting entries like this: /home/tug/public_html into an exclude file. This would omit everything under that directory. (I'm not sure if it omitted the directory itself, but I didn't care.) In rsync 2.6.7, this had no effect, and everything under /home/tug/public_html was copied. I notice that a new /*** feature was added, so perhaps that is related somehow. When I add /** or /***, the directory is excluded fine. Here's the invocation with all the options (I left out the dozens of other directories, but can send them if need be): rsync --archive --compress --partial --relative --rsync-path=/usr/local/bin/rsync --sparse -v -e ssh --exclude-from=/l/etc/backup.exclude 'tug:\ ... /home/tug \ ... ' /backup/u/tug A few of the (many) files that were copied: home/tug/public_html/rutgers05/vga/UnivRest256.jpg home/tug/public_html/rutgers05/vga/UniversityInn230.exif home/tug/public_html/rutgers05/vga/UniversityInn230.html home/tug/public_html/rutgers05/vga/UniversityInn230.jpg Thanks, Karl
On Mon, Mar 13, 2006 at 01:14:13AM +0100, Karl Berry wrote:> rsync --archive --compress --partial --relative [...]It appears that there is an exclude bug when dealing with --relative while copying an absolute path. The attached patch fixes this. This is big enough that 2.6.8 will appear shortly, but until then, this one-line fix will take care of the problem. I've also added a new test to the testsuite that will catch a problem such as this in the future. Thanks for the report, ..wayne.. -------------- next part -------------- --- exclude.c 28 Jan 2006 00:14:02 -0000 1.128 +++ exclude.c 13 Mar 2006 01:49:56 -0000 @@ -562,7 +562,7 @@ static int rule_matches(char *name, stru if (litmatch_array(pattern, strings, slash_handling)) return ret_match; } else if (anchored_match) { - if (strcmp(name,pattern) == 0) + if (strcmp(strings[0], pattern) == 0) return ret_match; } else { int l1 = strlen(name);