27 Jan
2022
27 Jan
'22
14:07
Engelhardt wrote:
As the manpage says, that still isn't atomic (and that is a bug of rsync). To get real atomic updates, rsync on the receive side would have to do the equivalent of `cp -al` of the entire hierarchy to a temp dir first, then perform the synchronization as usual, and then it could do an atomic rename of the temp directory with the renameat2(RENAME_EXCHANGE) syscall). Let's see if they will ever do it. The --link-dest trick in this script may help to make rsync atomic:
https://opensource.apple.com/source/rsync/rsync-55/rsync/support/atomic-rsyn... Greetings, Björn