Not really - initially rsync can scan a tree for hardlinks and remember
where they are. If a hardlink to a file is created, an rtime update is
sent up the tree via the path used to create the link. So during next scan,
rsync will see the file is modified and finds out that its nlink is > 1
and adds it to the list of hardlinked files.
So for things like regular backups hardlinks can be dealt with
efficiently.
Yes, being filesystem specific and thus requiring special handling of
mount points is a disadvantage of this approach.
Yes, the cases where we cannot modify the flag in a tree would have to be
handled (similarly as the cases where the filesystem simply does not
support the feature). I don't think it wouldn't be too complicated but I have
not the modification for rsync yet, so I can underestimate...
Yes, so in such cases my feature won't be able to help. But I think
there are still enough cases where it would help.
Good point.
No, the patch does not allow this. But anyway in case user has enough
rights to change file's mtime, would it really be a security concern?
Hardlinks can be worked-around as I wrote above and there would have to
be a fallback in case we cannot set the flag. So I agree the code would be
more complicated but I think it could be done in a quite clean way - but of
course that has to be proven by a patch which I don't have yet. I have not
spoken to rsync maintainers about this - first I want to have at least a
preliminary version of a patch for rsync so that we have something to
talk about...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
-