-stats output during restore should be improved

While -stats output during backup include uploaded and skipped chunks allowing progress to be monitored (using the percentage field), the -stats output during restore include only the downloaded chunks and it is not possible to monitor progress because skipped chunks are not reported.

Example

Downloaded chunk 164 size 2097152, 252KB/s 22:30:14 0.2%
Downloaded chunk 165 size 2097152, 263KB/s 21:31:24 0.2%
Downloaded chunk 166 size 2097152, 275KB/s 20:37:28 0.2%
Downloaded chunk 167 size 2097152, 286KB/s 19:47:51 0.2%
Downloaded chunk 168 size 2097152, 297KB/s 19:02:03 0.2%
Downloaded chunk 169 size 2097152, 307KB/s 18:25:47 0.2%
Downloaded chunk 170 size 2097152, 319KB/s 17:46:11 0.2%
Downloaded chunk 171 size 2097152, 330KB/s 17:09:19 0.2%
Downloaded chunk 197 size 2097152, 630KB/s 08:57:30 0.5%
Downloaded chunk 200 size 2097152, 641KB/s 08:48:01 0.5%
Downloaded chunk 199 size 2097152, 653KB/s 08:38:52 0.5%
Downloaded vnfs/1/images/debian-10-openstack-amd64.qcow2 (21223178240)
Restored /var/nfv to revision 9
Files: 2 total, 20240.00M bytes
Downloaded 1 file, 20240.00M bytes, 58 chunks
Total running time: 00:04:37

Skipped chunks are not passed to the chunk downloader so they are not shown. In the single file case it may be possible to determine, after reading the file, how many chunks need to be downloaded and how many can be skipped and thus to give an accurate progress report. However, if there are multiple files to be downloaded then you don’t known what chunks can be skipped without reading all the files at first.

Thanks for your feedback.

In that case, is reporting the percentage meaningful at all ?