Add repair count to borg check --repair output#8260
Add repair count to borg check --repair output#8260supercoder-dev wants to merge 1 commit intoborgbackup:masterfrom
Conversation
ThomasWaldmann
left a comment
There was a problem hiding this comment.
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.
Looks like you accidentally duplicated the call to orphan_chunks_check.
| ) | ||
| for id_ in unused: | ||
| self.repository.delete(id_) | ||
| self.repair_count += 1 |
There was a problem hiding this comment.
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.