Are rsync operations atomic at file level?

前端 未结 3 1214
粉色の甜心
粉色の甜心 2020-12-20 11:38

I\'m trying to figure out how if rsyncing files is atomic. I couldn\'t find any confirmation about it. Due to rsync being able to send only deltas, I was under the impressio

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-20 12:18

    Rsync creates a new temporary file which will contain blocks from the local (receiving) copy and whatever blocks it requires from the sending copy. When done the temporary file is moved into place replacing the original.

    Full details are here;

    http://rsync.samba.org/how-rsync-works.html

提交回复
热议问题