rsync feature suggestion

Dave Dykstra dwd at drdykstra.us
Tue Jan 7 20:12:01 EST 2003


What Hadmut wants is the oft-requested and discussed "files-from" option
that I once offered to write but haven't been able to get to.  Andy Schor
in http://lists.samba.org/pipermail/rsync/2001-November/005272.html posted
a patch for something similar but it only worked when the sender was on the
local machine and not when it was remote (among other issues).  I don't
believe you've posted your patch, Justin; does your "files-from" directly
contain the list of files to send and skip the recursive traversal?  If so,
I don't see the point of having rsync have the extra regex options you
mention because those could all be done by external greps that pre-process
the file list.

- Dave


On Fri, Jan 03, 2003 at 11:51:05AM -0600, Justin Banks wrote:
> 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 



More information about the rsync mailing list