Imagine I have a file remote/A which syncs to local/A and local/B is a hardlink of local/A. Is there a threat that on a next remote/A change and synchronization rsync will not delete local/A but only replace/add some part to it, thus changing local/B (because of hardlinking)?

1 Answer 1


With standard options, rsync will copy the new file assigning it a semi-random name, then it will rename the new file with the original name. In this process, no writes are directed at the original file, preserving its hadlinks.

On the other side, using the non-default--inplace option will overwrite the original file and its hardlinks.

Anyway, I strongly suggest to give a look at --link-dest option, which is extremely useful for deduplicated backups.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.