duplicacy icon indicating copy to clipboard operation
duplicacy copied to clipboard

`check -chunks` needs a progress bar

Open riobard opened this issue 5 years ago • 5 comments

As checking all chunks takes a very long time, a progress bar or at least showing how many chunks have been checked so far is needed. Otherwise there's no way to estimate how long it will take or if it's still progressing by just staring at the following text output

Listing all chunks
1 snapshots and 20 revisions
Total chunk size is 514,077M in 106920 chunks
All chunks referenced by snapshot test at revision 1 exist
All chunks referenced by snapshot test at revision 2 exist
All chunks referenced by snapshot test at revision 3 exist
All chunks referenced by snapshot test at revision 4 exist
All chunks referenced by snapshot test at revision 5 exist
All chunks referenced by snapshot test at revision 6 exist
All chunks referenced by snapshot test at revision 7 exist
All chunks referenced by snapshot test at revision 8 exist
All chunks referenced by snapshot test at revision 9 exist
All chunks referenced by snapshot test at revision 10 exist
All chunks referenced by snapshot test at revision 11 exist
All chunks referenced by snapshot test at revision 12 exist
All chunks referenced by snapshot test at revision 13 exist
All chunks referenced by snapshot test at revision 14 exist
All chunks referenced by snapshot test at revision 15 exist
All chunks referenced by snapshot test at revision 16 exist
All chunks referenced by snapshot test at revision 17 exist
All chunks referenced by snapshot test at revision 18 exist
All chunks referenced by snapshot test at revision 19 exist
All chunks referenced by snapshot test at revision 20 exist
Verifying 106764 chunks

riobard avatar May 16 '20 17:05 riobard

I agree..., also, when soft-failing during a chunk check (temporary network problems for example), the chunk check has no way of resuming from the last checked chunk. The whole process needs to be started from the beginning. Not sure if its possible, but it would be nice to be able to resume chunk checking.

abclution avatar Jun 12 '20 16:06 abclution

:+1:

Even -vv does not provide verbose output, it just prints Listing all chunks

stamster avatar Jun 19 '20 07:06 stamster

I second this, too.

wechsler42 avatar Jun 23 '20 07:06 wechsler42

Workaround: run check using -d, and log to a file: duplicacy -log -d check -chunks > logfile

Then in another console, monitor progress using that log file:

while true; do
  NUM_TOTAL=$(grep "Verifying .* chunks" logfile | awk '{print $6}')
  NUM_CHECKED=$((`grep 'DEBUG CHUNK_DOWNLOAD Chunk' logfile | wc -l`))
  echo "[$(date)] Progress: $NUM_CHECKED of $NUM_TOTAL ($((100 * $NUM_CHECKED / $NUM_TOTAL))%)"
  if [ "$NUM_CHECKED" -eq "$NUM_TOTAL" ]; then
    break
  fi
  sleep 5
done

gboudreau avatar Sep 02 '20 18:09 gboudreau

This feature now exists, issue can be closed

gutjuri avatar Oct 01 '23 16:10 gutjuri