s365b.jobs.repair¶
Find unreadable blobs in a repository and repair the backup around them.
A blob can become unreadable through disk faults or (before it was fixed) a compression bug. Its content cannot be recovered from the repository, but the item usually still exists in Microsoft 365. Repair therefore:
removes the catalog versions that use an unreadable blob (items left without versions are removed too),
resets the sync state of the affected objects, so the next backup reads them in full and stores those items again,
deletes the unreadable blobs, and only those, from the repository. This matters: storage is deduplicated by content, so as long as a blob ID is in the index, a new backup of the same content would reuse the broken copy.
It holds the repository’s lock exclusively, like retention.
Classes¶
What a check found and (unless a dry run) repaired. |
Functions¶
|
Read every blob; optionally repair around the unreadable ones. |
Module Contents¶
- class s365b.jobs.repair.RepairReport[source]¶
What a check found and (unless a dry run) repaired.
- Variables:
blobs – Blobs checked.
unreadable – Unreadable blob IDs.
versions – Item versions that use them.
objects – Affected objects, as “module: name” with a version count.
repaired – Whether the repair was applied.
- async s365b.jobs.repair.check_repository(services: s365b.core.services.Services, repository_fk: int, *, repair: bool, actor: str = 'cli') RepairReport[source]¶
Read every blob; optionally repair around the unreadable ones.
- Parameters:
services – Process services.
repository_fk – Repository.
repair – Apply the repair (otherwise only report).
actor – Who ran it, for the audit log.
- Returns:
The report.