Max Bowsher wrote > Hadmut Danisch wrote: > > I'd like to suggest a new feature to rsync. > > > I am mirroring a debian archive, but unfortunately, > > debian mixes all files of several distributions in a > > subtree /pool. There is no way to select only the files > > of a certain distribution through a simple exclude/include > > expression. > > > > There is a tool called debmirror, which first downloads > > the distribution index files, extracts all the filenames/paths > > of the files needed and then calls rsync for every single file. > > Thats certainly not useful, especially since rsync shows the > > servers motd for every single file. > > I was about to suggest: > $ rsync --include-from=list-file --exclude=\* > but of course that will exclude the parent directories of files you want, > causing them to be ignored. > > This might work: > $ rsync --include-from=list-file --include=\*\*/ --exclude=\* > > although it will mirror the entire directory structure (but not unspecified > files). > > Probably, rsync should be taught that: "If I explicitly include a file, look > for it explicitly, even if I've excluded a parent directory."
Not too long ago, I modified/mangled rsync to do rsync --files-from /some/file --include-regexes /some/regular/expressions \ --exclude-regexes /some/regular/expressions such that all the files in /some/file would be sent iff they matched the posix regexes in --include-regexes and didn't match the ones in --exclude-regexes (if present). I don't have a wide variety of platforms to test it on, but it worked okay on linux, solaris, and irix. -justinb -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html