delete exclusion

Gregory Brauer greg at
Wed Jun 25 09:47:37 EST 2003

jw schultz wrote:
> On Tue, Jun 24, 2003 at 04:29:47PM -0700, Gregory Brauer wrote:
>>Is it possible to use rsync to mirror a group of files, deleteing
>>most files from the mirror when they disappear from the source,
>>but not deleting a certain set of files that match a pattern if
>>they disappear from the source?
> What a vague yes or no question.  Which would you like "yes"
> or "no"?  Either would be correct depending on the
> details left out of the question.
> Read the manpage sections on --exlude, --delete and
> --delete-exlcuded, then you will be able to answer your own
> question or at least frame it in a way that isn't so vague.

Is there a way to do:

rsync -a --delete --exclude "foo*" rsync:// /here/A/
rsync -a --include "foo*" --exclude "*" rsync:// /here/A/

In a single rsync command?


More information about the rsync mailing list