Comment 12 for bug 412470

Revision history for this message
Bart de Koning (bratdaking) wrote :

> I think you confused it, didn't you? The subfolder has the higher
> frequency than the parent folder in my example. If they are disjoint,
> it makes sense to exclude the one with the lower frequency of course,
> so it doesn't get rsync'ed. But here they are not disjoint.
Not necessary to exclude something if you don't include it either, except when a subfolder has a lower frequency than the parent folder (otherwise you rsync the subfolder also with the higher freq). That is what I meant...

> I think it tries to hardlink in two steps: one before the rsync and
> one after. Before, the folders are hardlinked, which are going to be
> rsync'ed, after the other folders are, which should not be included in
> the rsync (because of their low frequency).
And that is exactly where it gets wrong. The copying afterwards is A not hardlinked, and B writes over the complete snapshot if it happens to be a parent folder. If you hardlink the complete older snapshot that copying afterwards is not necessary, except that rsync gets the --delete-excluded option. Why deleting something that you have copied in the first place and then afterwards copy it again. I just don't get that part...
So I removed & changed that part, and the behaviour is far better now, only not ideal for fat disks. I will do some testing in the meanwhile, and report the changes if they are successful...

> This fits. I think the *~ files are a symptom on my machine. Your cp
> -alb command behaves different. Mine detects that file3.txt already
> exists and makes a copy to file3.txt~ (link-count 1), then it
> hard-links file3.txt from source again.

>> -r--r--r-- 2 peter peter 11 2009-08-31 20:36 file3.txt <== linked from 20090831-204500, old! wrong!
>> -r--r--r-- 1 peter peter 12 2009-08-31 20:41 file3.txt~ <== that was rsync'ed, but cp made a backup after

Ok interesting, where comes that difference in behaviour from (mine is a Ubuntu box, but we use the same cp most probably)?
Anyway I think we should get rid of this deleting first and then copying afterwards anyway....