borg backup check failed errors found
Fixes Borg backup check failed with errors found: run repository and archives checks verbosely, repair only with a backup copy in place, and recreate damaged archives. Use when borg check reports errors. Not for restic repository checks.
TL;DR
Borg check reporting errors found means segment or archive metadata inconsistencies were detected. First run check in read-only verbose mode to see the exact damage, make a copy of the repository if any repair is contemplated, then use repair mode only for the classes Borg says are repairable, and recreate archives whose data segments are lost.
borg backup check failed errors foundUse this when
- borg check exits non-zero with errors found.
- borg check reports segment, CRC or archive metadata errors.
- borg list works but extracting one archive fails checks.
Not for this skill when
- The repository is locked by a running backup. Break the lock only after confirming no process is active.
- A restic or kopia repository reports errors. Their repair flows differ.
Steps
- Run borg check with verbose and read-only defaults and save the full error list. Verify: every error line is captured with segment or archive names
- Copy the entire repository to separate storage before any repair attempt. Verify: the copy completes and is itself listable
- Run borg check with repair only if errors are in repairable classes such as index or hints mismatches, and answer its prompts after reading them. Verify: repair completes and reports what it changed
- For archives with missing segment data, extract what is readable, then delete those archives in Borg and recreate them from source data. Verify: recreated archives pass an archives-only check
- Finish with a full borg check on the repository and archives. Verify: check exits 0 with no errors found
Variant phrasings
borg check errors found repair
The repair phrasing.
borgbackup repository check failed segment
The segment-error variant.
borg check archive corrupted fix
The archive wording.
Compatibility: BorgBackup 1.2 and 1.4 repositories in append-only or standard mode, local and SSH repositories.
Why it happens
Borg stores data in append-only segments with per-segment CRCs and a separate index. Power loss during commit, filesystem bugs, or storage errors can leave the index, hints and segments disagreeing. Check compares all three, which is why read-only diagnosis first matters: repair rewrites structures and is destructive when data segments themselves are gone.
Edge cases / pitfalls
- Repair mode is not undoable. The pre-repair copy is the only rollback.
- Frequent segment CRC errors on one host usually mean failing storage or memory, not Borg bugs.
- Append-only mode limits ransomware and accidental damage but still needs off-host copies for real safety.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstXLvhTbDAeB8DO9QkAccJg