On 15.02.2017 00:07, Viper wrote: > There is the problem which I discribed here > https://bugs.centos.org/view.php?id=12820. > 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 - ... --inplace 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) hardlink-errors. 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. -- Matthias -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html