Restic backup, percent_done bug?

Hello,

I’m using ‘–json’ parameter to get the backup output to stdout in JSON format.
I got an awkward ‘percent_done’ based in the folders I pass as parameter.

I’m doing:

‘restic -r /repo backup /parent /parent/child-1 /parent/child-2 /parent/child-3 --json’
The percent_done returned don’t go beyond 51~53%. However, the backup is done right.

If I pass only the parent folder, the percent_done works as expected (100%)
‘restic -r /repo backup /parent --json’

I know, doesn’t make sense to use the ‘child’ folders once I have already passed the ‘parent’. However I got this ‘error’ and would like to know if I should open an issue.

parent
├── child-1
     └── several-files and directories
├── child-3
     └── several-files and directories
├── child-2
     └── several-files and directories

I’m using restic 0.11.0, tried in both Linux and Windows.

Good find! I was able to reproduce this using the latest beta relase as well.

Have you done any searches here in the forum or on GitHub to make sure that this won’t be a duplicate?

Hi @moritzdietz , yes, I did and haven’t found anything. Let me know if I should open an issue.

Yeah I think that makes sense! Especially since we haven’t heard much here from other folks.
Plus the upside is that this is easily reproducible.

Done

1 Like

For future references: This report indeed was a bug and has been fixed.

Thanks for the report, it’s a bug, and it’s independent from the output mode. It also happens without --json . The reason is (as far as I remember) that the ‘scanner’ part of restic is not intelligent enough to realize that some dirs/files are specified twice and will add the size twice to total.Bytes . The part of restic which does the backup will realize that, so processed.Bytes will only include the size once.

Will be fixed in #3243, that was easier than I thought… :slight_smile:

More all information click here: --JSON percent_done doesn't calculate right · Issue #3232 · restic/restic · GitHub
With this I will mark this thread as solved. :slight_smile:

1 Like