I want to move some files using rsync, but it's vital that the files are intact at the destination before removing the source files. The thing is, I can't find any information telling me how rsync decides that a file has been transferred correctly: I'll need it to be properly checksummed. Anyone know how rsync does it?

link|improve this question
I am pretty confident that if it can't pass any attributes for instance, it won't accept the file as being copied. succesfully But why don't you give it a try by killing the session mid-copy? After all the algorithm might be the same but the implementations differ. – user Dec 20 '11 at 14:24
In answer to "how safe is it": how good is your disaster recovery plan? – Andrew Dec 21 '11 at 4:22
Rock solid on one side of the sync, non-existant at the other. And unfortunately I don't have control over that side :-( Hence the reason I'd like to make any failures as unlikely as possible. – spookypeanut Dec 21 '11 at 11:29
feedback

1 Answer

up vote 0 down vote accepted

You need to pass the --checksum to ensure files that have the same size & times on source and destination are not skipped. Then, as per Wikipedia:

The recipient splits its copy of the file into fixed-size non-overlapping chunks and computes two checksums for each chunk: the MD4 hash, and a weaker 'rolling checksum'. (Version 30 of the protocol, released with rsync version 3.0.0, now uses MD5 hashes rather than MD4.[14]) It sends these checksums to the sender.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.