Disaster recovery: repair corrupted archive from PAR2 #193

Closed
opened 2026-04-09 16:59:49 +00:00 by fuzzy · 1 comment
Owner
No description provided.
fuzzy self-assigned this 2026-04-09 16:59:49 +00:00
fuzzy closed this issue 2026-04-11 18:35:52 +00:00
Author
Owner

Implemented as part of Phase 6. PAR2‑based repair is now available in two modes:

  1. Validation with repair: reptar -V --repair -f archive.tar.gz – validates archive integrity, detects corrupted files via BLAKE3/CRC32 mismatches, and attempts reconstruction using stored parity data.
  2. Extraction with repair: reptar -x --repair -f archive.tar.gz – extracts files; if a file’s hash mismatches the stored metadata, the tool automatically reconstructs it from parity blocks before writing to disk.

The core repair logic is in internal/repair/reconstruct.go and is integrated into runValidate and runExtract in cmd/reptar/main.go.

Implemented as part of Phase 6. PAR2‑based repair is now available in two modes: 1. **Validation with repair**: `reptar -V --repair -f archive.tar.gz` – validates archive integrity, detects corrupted files via BLAKE3/CRC32 mismatches, and attempts reconstruction using stored parity data. 2. **Extraction with repair**: `reptar -x --repair -f archive.tar.gz` – extracts files; if a file’s hash mismatches the stored metadata, the tool automatically reconstructs it from parity blocks before writing to disk. The core repair logic is in `internal/repair/reconstruct.go` and is integrated into `runValidate` and `runExtract` in `cmd/reptar/main.go`.
Sign in to join this conversation.
No description provided.