Problem with rsync-2.6.8 and -c (checksum)

Andreas Fehr andreas at mrs.ch
Tue May 23 09:40:48 GMT 2006


On Tuesday, 23. May 2006, 11:07, Paul Slootman (as PS) wrote:

>PS: On Mon 22 May 2006, Andreas Fehr wrote:
>PS: > 
>PS: > If added '-c' to the already existing '-a'. Now it looks as follows:
>PS: > 
>PS: > /opt/rsync/bin/rsync -cav
>PS: > --link-dest=/home/user/backup/old
>PS: >             /home/user/source 
>PS: >             /home/user/backup/new
>PS: > 
>PS: > 
>PS: > I expected, that rsync doesn't care about the timestamp anymore. 
>PS: > It should calc the checksum of all the files in the source 
>PS: > directory, compares them with the files in the '--link-dest' 
>PS: > directory and just copies the files with a different checksum. 
>PS: > But there is no change in the behavior of rsync. I get the same 
>PS: > result with or without the '-c' option.
>PS: > 
>PS: > My guess: --checksum does not work on --link-dest. Is this by 
>PS: > design?
>PS: 
>PS: It does, but not the way you expect it.
>PS: 
>PS: The -a also implies -t, so you're telling rsync to preserve 
>PS: timestamps. The only way it can do that is by creating a new file, 
>PS: as the --link-dest tree has a different timestamp.

Ok thanks, this sounds reasonable.


Well, I changed '-a' to '-rlpgoD' (according to the man page, it maps to 
'-rlptgoD'). But now it's worse.... each call of rsync copies all the 
files from source to new.

/opt/rsync/bin/rsync -crlpgoDv
--link-dest=/home/user/backup/old
            /home/user/source 
            /home/user/backup/new

Do you understand what I want to do? Is there anything wrong with the 
above command (or my idea of rsync and --checksum)?

Thanks for your help,
Andreas


More information about the rsync mailing list