IDB Utils
A command-line toolkit for inspecting, validating, and manipulating InnoDB database files. Written in Rust for performance and reliability, the inno binary operates directly on .ibd tablespace files, redo logs, and system tablespaces — no running MySQL instance required.
Also available as a browser-based analyzer powered by WebAssembly.
What It Does
- Inspect tablespace files — parse page headers, examine B+Tree index structures, walk undo logs, inspect BLOB/LOB chains
- Validate data integrity — verify CRC-32C and legacy InnoDB checksums, detect LSN mismatches
- Compare tablespace files — diff two
.ibdfiles page-by-page - Monitor tablespace changes — watch a live
.ibdfile for page-level modifications in real time - Extract metadata — read MySQL 8.0+ SDI directly from
.ibdfiles - Analyze redo logs — parse log file headers, checkpoints, and data blocks
- Assess data recoverability — scan damaged tablespaces, count salvageable records
- Test recovery scenarios — intentionally corrupt pages for testing
- Decrypt encrypted tablespaces — read MySQL encrypted
.ibdfiles using the keyring file - Audit a data directory — search for pages, list tablespace IDs, compare LSNs
Installation
# From crates.io
# Homebrew (macOS/Linux)
# From source
Pre-built binaries for Linux and macOS (x86_64 + aarch64) are available on the releases page.
Quick Start
# Parse a tablespace and show a page type summary
# Validate every page checksum
# Get detailed INDEX page structure
# Hex dump page 3
# Extract table/column definitions from MySQL 8.0+ SDI
# Analyze redo log checkpoints
# Compare two tablespace files
# Monitor a tablespace for live changes
# Assess recoverability of a damaged tablespace
# Read an encrypted tablespace
Every subcommand supports --json for machine-readable output and --help for full option details.
Subcommands
| Command | Description |
|---|---|
parse |
Parse .ibd file and display page headers with type summary |
pages |
Detailed page structure analysis (INDEX, UNDO, LOB, SDI) |
dump |
Hex dump of raw page bytes |
checksum |
Validate page checksums (CRC-32C and legacy InnoDB) |
diff |
Compare two tablespace files page-by-page |
watch |
Monitor a tablespace file for page-level changes |
corrupt |
Intentionally corrupt pages for recovery testing |
recover |
Assess page-level recoverability and count salvageable records |
find |
Search for pages across a MySQL data directory |
tsid |
List or find tablespace IDs |
sdi |
Extract SDI metadata from MySQL 8.0+ tablespaces |
log |
Analyze InnoDB redo log files |
info |
Inspect ibdata1 headers, compare LSNs, query MySQL |
See the CLI Reference for detailed documentation on each subcommand.
Supported InnoDB Variants
| Vendor | Checksums | SDI | Redo Logs |
|---|---|---|---|
| MySQL 5.7+ | CRC-32C, Legacy | Yes (8.0+) | Full parsing |
| Percona XtraDB | Same as MySQL | Yes (8.0+) | Full parsing |
| MariaDB 10.1+ | full_crc32 (10.5+), CRC-32C |
N/A | Header + checkpoints |
Page sizes 4K, 8K, 16K (default), 32K, and 64K are all supported and auto-detected.
Building and Testing
# Build
# With MySQL query support
# Run tests
# Lint (zero warnings enforced)
Documentation
- User Guide & CLI Reference — full documentation site
- API Docs (docs.rs) — Rust library API reference
- Web Analyzer — browser-based file analysis
- Contributing — development setup and contribution guidelines
License
MIT