On Wed, 5 Feb 2003, Ben Escoto wrote:

> >>>>> "CB" == Craig Barratt <[EMAIL PROTECTED]>
> >>>>> wrote the following on Wed, 05 Feb 2003 04:41:22 -0800
> 
>   CB> Of course, a major issue with --inplace is that the file will be
>   CB> in an intermediate state if rsync is killed mid-transfer.  Rsync
>   CB> currently ensures that every file is either the original or new.
> 
> I'm curious, how does it ensure this?

During the copy, rsync writes to a temporary file in the same directory
(the temp file is hidden; it starts with a ".").  Then, once the transfer
is done, it mv's that temp file over the original.  My understanding is
that mv is atomic under unix, so this action either happens in its
entirety or not at all.

Mike

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Reply via email to