delete exclusion

Gregory Brauer greg at wildbrain.com
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://somewhere.com/A/ /here/A/
rsync -a --include "foo*" --exclude "*" rsync://somewhere.com/A/ /here/A/

In a single rsync command?

Greg




More information about the rsync mailing list