Martin Scharrer
2009-Jan-28 14:57 UTC
Exclude some source files from being deleted when --remove-source-files is used
Hi, 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. Thanks, Martin -- View this message in context: http://www.nabble.com/Exclude-some-source-files-from-being-deleted-when---remove-source-files-is-used-tp21702836p21702836.html Sent from the Samba - rsync mailing list archive at Nabble.com.
Matt McCutchen
2009-Jan-28 15:11 UTC
Exclude some source files from being deleted when --remove-source-files is used
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