Complex include/excludes with rsync?
brian.mathis at gmail.com
Tue Jun 15 13:06:03 MDT 2010
Thanks for the reply. I had also posted to serverfault and got a good
reply that explains better
I think the fact that this comes up so often means there's a problem
with the documentation.
On Fri, Jun 11, 2010 at 11:33 PM, Matt McCutchen <matt at 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:
> 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
More information about the rsync