Rsync and open files

'mbp at' mbp at
Thu Jul 25 15:35:02 EST 2002

On 25 Jul 2002, "Childs, Jim" <jchilds at> wrote:
> Greetings.
> I have been looking around the web for information about what rsync does
> when the file being copied from is open and changing, but haven't seen this
> topic discussed anywhere.  If you know of any place this is discussed, could
> you point me to it?
> Rsync looks like a great tool.  We are still on the learning curve.

The source file or the destination?

If the source is changing, the results are undefined.  Basically no other
semantics are feasible on a machine without filesystem-level transactions.
You will get some kind of mix of the various states, which is probably 
not what you want.

If you're thinking of backing up, e.g., a database, you need to either
shut it down, or take advantage of some kind of logging or rollover
mechanism to make the relevant files quiescent.

If the source file is merely being appended to, then I think you will 
be OK.

The destination file is replaced by a new file when the transfer is 
complete, so anyone who has it open will keep writing to an unlinked
file, and processes that open it afterwards will see the new file.


More information about the rsync mailing list