-
-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add repair count to borg check --repair output #8260
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR! See my comments...
self.orphan_chunks_check() | ||
self.repair_count = 0 | ||
self.orphan_chunks_check() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you accidentally duplicated the call to orphan_chunks_check.
@@ -2338,7 +2343,9 @@ def orphan_chunks_check(self): | |||
) | |||
for id_ in unused: | |||
self.repository.delete(id_) | |||
self.repair_count += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess it is least important to count the fixed orphaned objects - while they should not occur in the ideal case, there can be conditions producing them.
But, orphans (chunks that are not referenced by any archive) are only a cosmetic issue and we could also just silently remove them (that's why the log message is on INFO level, not WARNING or ERROR).
It would be more important to count the severe "repaired" issues, e.g. if a referenced chunk is missing from the repo and was replaced by an all-zero replacement chunk. That's data loss and the repair is only bringing back consistency, but it's not bringing back the data.
If such a lost chunk reappears later, borg check can also heal it, that's a real repair then.
@supercoder-dev Did you see my feedback? |
Ping? |
Update 'borg check --repair' to include the number of problems repaired in the final output message. This provides users with clearer information about the repairs performed during the consistency check.