Exclude some source files from being deleted when --remove-source-files is used

Matt McCutchen matt at mattmccutchen.net
Wed Jan 28 15:11:35 GMT 2009


On Wed, 2009-01-28 at 01:58 -0800, Martin Scharrer wrote:
> I'm using rsync to transfer some files from host A to B and using
> --remove-source-files to remove them from A after the transfer. Now however
> I have one file 'md5sum' which should be transfered but not removed. I tried
> the protect filter rule but this seems not to work in this case. All other
> ways I tried don't work either.
> 
> Does anyone know how to do this using a single rsync call? I know I could
> transfer the md5sum file first in a separate rsync operation and then
> exclude it from the second one, but I'm looking for a single-rsync-operation
> solution.

I don't believe there's a way to do it in a single rsync run.

-- 
Matt



More information about the rsync mailing list