inno repair

Recalculate and fix corrupt page checksums.

Usage

# Repair a single file
inno repair -f table.ibd

# Repair a specific page
inno repair -f table.ibd -p 5

# Dry run (preview without modifying)
inno repair -f table.ibd --dry-run

# Batch repair all files in a directory
inno repair --batch /var/lib/mysql

# Force a specific algorithm
inno repair -f table.ibd -a crc32c

# Skip backup creation
inno repair -f table.ibd --no-backup

Options

OptionDescription
-f, --filePath to InnoDB data file
--batchRepair all .ibd files under a directory
-p, --pageRepair only a specific page number
-a, --algorithmChecksum algorithm: auto, crc32c, innodb, full_crc32 (default: auto)
--no-backupSkip creating a .bak backup
--dry-runPreview repairs without modifying files
-v, --verboseShow per-page repair details
--jsonOutput in JSON format
--page-sizeOverride page size
--keyringPath to MySQL keyring file

Behavior

  • Auto-detects the checksum algorithm from page 0 unless --algorithm is specified
  • Creates a .bak backup before modifying the file (unless --no-backup)
  • Only rewrites pages with invalid checksums
  • Batch mode processes files in parallel using rayon
  • Compatible with --audit-log for write operation tracking