samba-bugs at samba.org
2010-May-21 21:45 UTC
DO NOT REPLY [Bug 7450] New: When a single file is specified, the exclusion of it in the exclude-from file is ignored
https://bugzilla.samba.org/show_bug.cgi?id=7450 Summary: When a single file is specified, the exclusion of it in the exclude-from file is ignored Product: rsync Version: 3.0.7 Platform: x64 OS/Version: Linux Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned at samba.org ReportedBy: gordan at bobich.net QAContact: rsync-qa at samba.org If a single file is specified for rsyncing, and that file is specified in the exclude file, it gets rsynced anyway. This is broken behaviour - if there is such a conflict of instruction, it should fail "safe" and do nothing. e.g.: $ cat /tmp/test/exclude /tmp/test/1/foo $ touch /tmp/test/1/foo $ ls -laR /tmp/test/ /tmp/test/: total 4 drwxrwxr-x 4 gordan gordan 100 May 21 22:22 . drwxrwxrwt 13 root root 280 May 21 22:31 .. drwxrwxr-x 2 gordan gordan 60 May 21 22:05 1 drwxrwxr-x 2 gordan gordan 40 May 21 22:23 2 -rw-rw-r-- 1 gordan gordan 16 May 21 22:22 exclude /tmp/test/1: total 4 drwxrwxr-x 2 gordan gordan 60 May 21 22:05 . drwxrwxr-x 4 gordan gordan 100 May 21 22:22 .. -rw-rw-r-- 1 gordan gordan 5 May 21 22:05 foo /tmp/test/2: total 0 drwxrwxr-x 2 gordan gordan 40 May 21 22:23 . drwxrwxr-x 4 gordan gordan 100 May 21 22:22 .. $ rsync --exclude-from=/tmp/test/exclude /tmp/test/1/foo /tmp/test/2/ $ ls -la /tmp/test/2/ total 4 drwxrwxr-x 2 gordan gordan 60 May 21 22:42 . drwxrwxr-x 4 gordan gordan 100 May 21 22:22 .. -rw-rw-r-- 1 gordan gordan 5 May 21 22:42 foo Tested on both x86 and x64, and rsync versions 2.6.8 and 3.0.7, so this seems to be a long standing issue. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2010-May-21 21:50 UTC
DO NOT REPLY [Bug 7450] When a single file is specified, the exclusion of it in the exclude-from file is ignored
https://bugzilla.samba.org/show_bug.cgi?id=7450 matt at mattmccutchen.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from matt at mattmccutchen.net 2010-05-21 16:50 CST ------- Your exclude pattern is incorrect. Please see the "ANCHORING INCLUDE/EXCLUDE PATTERNS" section of the man page. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2010-May-21 22:05 UTC
DO NOT REPLY [Bug 7450] When a single file is specified, the exclusion of it in the exclude-from file is ignored
https://bugzilla.samba.org/show_bug.cgi?id=7450 ------- Comment #2 from gordan at bobich.net 2010-05-21 17:05 CST ------- (In reply to comment #1)> Your exclude pattern is incorrect. Please see the "ANCHORING INCLUDE/EXCLUDE > PATTERNS" section of the man page. >Quote from the man page: "if the pattern starts with a / then it is anchored to a particular spot in the hierarchy of files, otherwise it is matched against the end of the pathname. This is similar to a leading ^ in regular expressions. Thus "/foo" would match a name of "foo" at either the "root of the transfer" (for a global rule) or in the merge-file?s directory (for a per-directory rule)." Can you explain how the pattern "/tmp/test/1/foo" doesn't match the file "/tmp/test/1/foo"? What should the correct pattern be? -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2010-May-22 01:20 UTC
DO NOT REPLY [Bug 7450] When a single file is specified, the exclusion of it in the exclude-from file is ignored
https://bugzilla.samba.org/show_bug.cgi?id=7450 ------- Comment #3 from matt at mattmccutchen.net 2010-05-21 20:20 CST ------- Since you aren't using --relative, the "root of the transfer" is at the last slash in the source argument. The exclude pattern should be simply /foo . -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2010-May-29 14:48 UTC
DO NOT REPLY [Bug 7450] When a single file is specified, the exclusion of it in the exclude-from file is ignored
https://bugzilla.samba.org/show_bug.cgi?id=7450 ------- Comment #4 from wayned at samba.org 2010-05-29 09:48 CST ------- Alternately, if you want to specify an absolute path, use a filter file with the slash (/) modifier. i.e., if you put this in your /tmp/test/exclude file: -/ /tmp/test/1/foo and use this command: rsync -aiv --filter='. /tmp/test/exclude' /tmp/test/1/foo /tmp/test/2/ then rsync will exclude that path at any point in any transfer. If --delete were added, keep in mind that the protected file on the receiving side must also match the absolute path, so no "foo" in the receiving directory would be protected from deletion in the above transfer (unlike using --exclude=/foo). -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Possibly Parallel Threads
- DO NOT REPLY [Bug 5199] New: Exclusion of source arg ancestor short-circuits recursion
- DO NOT REPLY [Bug 4263] New: Symlinks gets corruped when rsyncd is used to 'put' the symlink.
- DO NOT REPLY [Bug 5182] New: -r --include= --exclude= broken for version>=3.0.0pre5?
- DO NOT REPLY [Bug 6262] New: single-file rsync fails without further options set
- DO NOT REPLY [Bug 4807] New: No transfer of single files out of a module on Itanium IA64