Viper
2017-Feb-15 08:07 UTC
There is problem of rsync with options --hard-links --inplace.
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? -- View this message in context: http://samba.2283325.n4.nabble.com/There-is-problem-of-rsync-with-options-hard-links-inplace-tp4714872.html Sent from the Samba - rsync mailing list archive at Nabble.com.
Matthias Schniedermeyer
2017-Feb-15 10:14 UTC
There is problem of rsync with options --hard-links --inplace.
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
Reasonably Related Threads
- --link-dest --inplace updates files without unlinking. What to do?
- DO NOT REPLY [Bug 4079] New: rsync fails with --inplace, --link-dest and --no-whole-file
- How dangerous is --inplace
- DO NOT REPLY [Bug 5201] New: Rsync lets user corrupt dest by applying non-inplace batch in inplace mode
- The --inplace is very different from the behaviour of --partial when resuming a complex case transfer.