Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

supercoder-dev
Copy link

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.

Copy link
Member

@ThomasWaldmann ThomasWaldmann left a 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...

Comment on lines 1872 to +1874
self.orphan_chunks_check()
self.repair_count = 0
self.orphan_chunks_check()
Copy link
Member

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
Copy link
Member

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.

@ThomasWaldmann
Copy link
Member

@supercoder-dev Did you see my feedback?

@ThomasWaldmann
Copy link
Member

Ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants