rsync in-place (was Re: rsync 1tb+ each day)

Mike Rubel mrubel at
Thu Feb 6 04:17:03 EST 2003

On Wed, 5 Feb 2003, Ben Escoto wrote:

> >>>>> "CB" == Craig Barratt <craig at>
> >>>>> 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.


More information about the rsync mailing list