Thanks for the reply. I had also posted to serverfault and got a good reply that explains better (http://serverfault.com/questions/150269/complex-includes-excludes-with-rsync/150519#150519)
I think the fact that this comes up so often means there's a problem with the documentation. http://www.flickr.com/photos/cvander/1885428341/ On Fri, Jun 11, 2010 at 11:33 PM, Matt McCutchen <m...@mattmccutchen.net> wrote: > On Thu, 2010-06-10 at 19:16 -0400, Brian Mathis wrote: >> I'm trying to use rsync filters to achieve the following result: >> >> Include / >> Exclude /home >> Include /home/user1 >> >> I've been doing a lot of experimentation and at this point I'm just >> staring at the man page. Rsync filters seem to be complicated, and a >> result of that I hope they are also powerful. >> >> How does one achieve this common pattern with rsync? > > This has been asked many times before, for example: > > http://lists.samba.org/archive/rsync/2007-June/017805.html > http://lists.samba.org/archive/rsync/2008-February/020073.html > http://lists.samba.org/archive/rsync/2009-August/023758.html > > The key is that you don't want to actually exclude /home because that > will prevent rsync from even descending to /home/user1 (search the man > page for "ineffectual"). Instead, exclude all the children of /home > other than /home/user1, for example: > > + /home/user1 > - /home/* > > Alternatively, there is a trick you can do with multiple source > arguments: > > http://lists.samba.org/archive/rsync/2006-February/014761.html > > -- > Matt > > -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html