Is there some way to make rsync
report why it decided to make a new copy of a file, instead of hard-linking it? (E.g. because of timestamp, or detected a change in content... etc.)
(I'm creating incremental backups but some files which should not have been changed for long time, are still getting copied over instead of hard-linked.)
Related, but does not solve my problem: rsync --link-dest not linking
In that question, all files are being copied instead of linked, whereas in my case only some files are being copied (so I guess the syntax of the command is correct).
For reference, the command I'm using is:
rsync -av -delete --link-dest=/path/to/previous/backup/ /path/to/source/ /path/to/new/backup/
(Note the slashes at the end!)
-i
(--itemize-changes
) in place of-v
(--verbose
). It will give you more information about why a file is being copied. If that solves your issue, I may write it up as a proper answer later (if nobody else does first).cf.....g...
, which, if I understand correctly, means that checksum and group are different. The checksum did not change, though (I tried md5sum), but the groups were indeed not the same.c
just means that this update is a "change". (The first character is the "update type". Had it been a transfer then it would have had>
or<
instead). What's happening for that particular file is that the group is changed.