Understanding the output of –info=progress2 from rsync

If I run rsync with --info=progress2, I get an output like

105.45M  13%  602.83kB/s    0:02:50 (xfr#495, ir-chk=1020/3825)

But what do the single numbers mean? I haven’t found a matching entry in the man page.

  • The first number seems to be the amount of data which was processed (the actual copied bytes as well as the bytes skipped, because they were already existing at the target location), right? It seem not to be the number of transferred data, because it increases faster than my internet connection is…
  • Does the percentage refer to the amount of data or the number of files to be copied? Does it consider excluded files and files that are already up to date at the target location?
  • The time at third position first seemed to be an time estimation for completion, but when I tried it, it jumped between few hours and a few seconds. What does it refer to, and how is it calculated?
  • What do the last two numbers mean?
Asked By: muffel

||
105.45M 13% 602.83kB/s 0:02:50 (xfr#495, ir-chk=1020/3825)

Means that:

  • The receiver/destination has so far reconstructed 105.45 megabytes (or 13%) of the approximately 811.15 megabytes (100%) of the sender’s/source’s files.
  • These files are being reconstructed at a rate of 602.83 kilobytes per second and this data transfer operation so far took 2 minutes and 50 seconds (elapsed time).

Also, xfr#495 means that currently the 495th file is being transferred, while ir-chk=1020/3825 indicates that, out of a total of (so far) 3825 files recursively scanned (detected), so far 1020 of them are still to be checked/verified.

It means that if the scan detects e.g. more 100 files to be checked, both sides will increment by 100 (it will then read ir-chk=1120/3925). After all files have been scanned (detected by the incremental recursion scan), the number at the right side of the slash will remain the same until the end of the whole process, while the one at the left side of the slash will begin to decrease as more and more files are checked (verified). Also, due to the end of the recursion, ir-chk will change to to-chk, indicating that the incremental recursion scan has ended performing its checking (file detection operation). Still, because the files will keep being checked/verified until all of them are, the number of files yet to check/verify (left side of the slash) will decrease until such number becomes zero (indicating the end of the file verification process).

Let N be the actual total number of files to be checked/verified, when the whole process ends you’ll see:

to-chk=0/N

…meaning there’s no file left to be checked/verified, out of a total of N files that were detected by the incremental recursion scan.

About ir-chk (from rsync’s manual page):

In an incremental recursion scan, rsync won’t know the total
number of files in the file-list until it reaches the ends of the
scan, but since it starts to transfer files during the scan, it will
display a line with the text “ir-chk” (for incremental recursion
check) instead of “to-chk” until the point that it knows the
full size of the list, at which point it will switch to using
“to-chk”. Thus, seeing “ir-chk” lets you know that the total count of
files in the file list is still going to increase (and each time it
does, the count of files left to check will increase by the number
of the files added to the list).

Answered By: Yuri Sucupira
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.