rsync include partial files in list to send?

Matt McCutchen hashproduct+rsync at gmail.com
Wed Sep 12 01:56:10 GMT 2007


On 9/11/07, brad miele <bmiele at ipnstock.com> wrote:
> i am hoping to use rsync with the --remove-sent-files option. the sending
> side of the transaction will very likely include files that are being
> written to when rsync is run. will rsync include these partial files in
> it's list? i want to avoid the copying of the partial files and obviously
> their removal from the source.

Yes, unfortunately, rsync will send the partially written files and
delete them from the source.  This is one of several weaknesses in its
handling of concurrent modifications to the source.

If you can modify the program that is writing the files, I suggest you
have it write to a file with a temporary name (say ending with .tmp)
and then rename the file to the real name.  Then, tell rsync to
--exclude='*.tmp' and you'll be all set.

Matt


More information about the rsync mailing list