how to mirror only selected directories?

Moe, Mark at
Mon Aug 29 21:10:52 GMT 2005


I've tried various combinations of --exclude and --include, but I can't
quite get it.  What I'd like to do is only mirror certain directories in
a tree.  For example, say a directory tree starting at /x contained
under it several directories named "abc".  I want to mirror only the
"abc" directories and what's under them and nothing else.


If the above represents the 5 files under /x, then I'd like to rsync to
only mirror the files under "abc" folders, namely /x/y/abc/ and
/x/z/abc/.  I tried to include '*/abc/*' and exclude '*', but that
didn't work.


- Mark

More information about the rsync mailing list