repair

Prepare, inspect, and run repair data for normal CAS objects, and rebuild the pack index in format v2.

Back to CLI Commands

repair manages optional repair data for normal CAS objects. It can estimate the data that would be needed, prepare repair shards, inspect existing RepairSets, verify repair data, and restore recoverable missing or corrupted normal CAS objects.

Repair data is snapshot-local and is not a full backup. Keep normal backups for important work. Use repair as an additional recovery aid, not as the only copy of your data.

In a format v2 repository, repair groups chunks with pack files in mind, so losing one whole pack file can still be recovered. repair reindex rebuilds the chunk index from the index stored at the end of each pack file.

Usage
rinne repair estimate [--space <space>] [--parallel <N>] <selector>
rinne repair prepare  [--space <space>] [--parallel <N>] <selector>
rinne repair status   [--space <space>]
rinne repair verify   [--space <space>] <selector>
rinne repair run      [--space <space>] [--dry-run] <selector>
rinne repair prune    [--space <space>] [--dry-run]
rinne repair clear    (--space <space> | --all-spaces) (--dry-run | --force)
rinne repair reindex  [--dry-run]
Commands
estimate
Show the repair plan and expected shard size for the selected snapshot.
prepare
Create or reuse repair shards for the selected snapshot.
status
List existing RepairSets. Use --space to limit the view to one space.
verify
Check repair metadata and repair shard presence for the selected snapshot.
run
Restore missing or corrupted normal CAS objects from repair data. Add --dry-run to report recoverable and unrecoverable chunks without writing.
prune
Remove orphaned repair metadata and shards. Add --dry-run to preview the cleanup.
clear
Remove repair metadata and shards for a space or all spaces. This requires --force for deletion or --dry-run for preview.
reindex
Restore missing chunk index rows from the index at the end of each pack file. Format v2 only. New in v0.9.8. Add --dry-run to report what would be restored.
Options
--space <space>
Use the specified space instead of the current space.
--parallel <N>
Override max degree of parallelism. Valid for estimate and prepare.
--dry-run
For run: report recoverable and unrecoverable chunks without writing. For prune and clear: show what would be removed without deleting it. For reindex: report without writing.
--force
Required by repair clear to delete repair data.
--all-spaces
Clear repair data for all spaces. Valid for repair clear.
Examples
Estimate repair data for the latest snapshot
rinne repair estimate '@0'
Prepare repair data for the latest snapshot
rinne repair prepare '@0'
List existing RepairSets in the current space
rinne repair status
Verify repair data for a snapshot
rinne repair verify '@0'
Preview repair without writing normal CAS objects
rinne repair run --dry-run '@0'
Run repair for missing or corrupted normal CAS objects
rinne repair run '@0'
Preview repair cleanup
rinne repair prune --dry-run
Clear repair data for one space
rinne repair clear --space main --force
Check which pack index rows can be rebuilt (format v2)
rinne repair reindex --dry-run
Notes
  • Selectors accept @N, full ids, and unique prefixes. In PowerShell, quote selectors such as '@0'.
  • Progress is written to stderr. Final results are written to stdout.
  • Repair data is snapshot-local and is not a full backup.
  • Source snapshots must remain available for repair to be valid.
  • Use repair prune or repair clear to maintain repair data. Avoid manual edits under .rinne/store/repair/.
  • repair reindex only adds rows for chunks that have neither an index row nor a loose file. Rows that disagree with a pack are reported and left unchanged, because the database is treated as the source of truth.
  • When repair prepare finds a group that no longer follows the pack-aware rule (for example after gc rewrote packs), it rebuilds that group instead of reusing it.