There is problem of rsync with options --hard-links --inplace.
ms at citd.de
Wed Feb 15 10:14:29 UTC 2017
On 15.02.2017 00:07, Viper wrote:
> There is the problem which I discribed here
> rsync does not break hard-link into destination if hard-link has be broken
> in source with option inplace.
> The problem remains in the latest version of rsync?
This is documented in the man-page.
- snip -
This option changes how rsync transfers a file when its
data needs to be updated: instead of the default method of creating a
new copy of the file and moving it into place when it is complete, rsync
instead writes the updated data directly to the destination file.
This has several effects:
o Hard links are not broken. This means the new
data will be visible through other hard links to the destination file.
Moreover, attempts to copy differing source files onto a multiply-linked
destination file will result in a "tug of war" with the destination data
changing back and forth.
- snip -
"--inplace" is an option where you have to know what you are doing,
otherwise it can go horribly wrong.
Personally i rarely use "--inplace" and in the cases where i do use it i
skip it periodicaly for exactly the reason to fix (eventual)
For e.g. in my daily backup-script i skip the option on fridays, this
way hardlink errors will get fixed within a week.
If correct hardlinks are important to you, the best you can do is
execute rsync twice. Once with --inplace and after that again without
--inplace. If there are no changes in the meantime, the most the second
rsync will do is fix hardlink errors.
More information about the rsync