Jeremy
Jeremy

Reputation: 2956

What is the checkrq algorithm (used by rsync)?

What is the "checkrq" algorithm used by rsync? I keep seeing it when looking up explanations of how rsync works (e.g. here), but can't find any explanation of what checkrq itself is. Is it similar to a Merkle tree?

Upvotes: 1

Views: 1135

Answers (1)

Nubarke
Nubarke

Reputation: 2130

There is no "checkrq" algorithm. It is presumably a mistranscription by the (presumably online, e.g. https://linux.die.net/man/1/rsync) manual page you're using.

Source: check your locally installed man page.

 Rsync finds files that need to be transferred using a "quick check" algorithm (by default) that looks for files that have changed in size or in last-modified time. 

So it basically looks for filesystem attributes (size, modification time) to know if it needs to transfer the file. If your particular deployment scenario makes it likely that a file will be modified in-place without changing the size or updating the modification time, rsync provides a checksum-based method for detecting files that need to be transferred.

-c, --checksum              skip based on checksum, not mod-time & size

Upvotes: 4

Related Questions