inno -- CLI Overview

inno is the command-line interface for IDB Utils, an InnoDB file analysis toolkit. It provides 30 subcommands for inspecting, validating, comparing, and manipulating InnoDB tablespace files, redo logs, binary logs, and system tablespaces.

Installation

# From crates.io
cargo install innodb-utils

# From Homebrew
brew install ringo380/tap/inno

Subcommand Reference

Inspection & Parsing

CommandDescription
inno parseParse .ibd file, display page headers and type summary
inno pagesDetailed page structure analysis (INDEX, UNDO, LOB, SDI)
inno dumpHex dump of raw page bytes
inno sdiExtract SDI metadata from MySQL 8.0+ tablespaces
inno schemaExtract schema and reconstruct DDL from tablespace metadata
inno exportExport record data as CSV, JSON, or hex dump
inno infoInspect ibdata1, compare LSNs, query MySQL

Validation & Health

CommandDescription
inno checksumValidate page checksums (CRC-32C, legacy, MariaDB full_crc32)
inno healthPer-index B+Tree health metrics (fill factor, fragmentation, bloat)
inno verifyVerify structural integrity of a tablespace
inno validateValidate tablespace against live MySQL
inno compatCheck upgrade compatibility between MySQL versions
inno auditAudit data directory for integrity, health, or checksum mismatches

Comparison & Monitoring

CommandDescription
inno diffCompare two tablespace files page-by-page
inno watchMonitor a tablespace for page-level changes in real time
inno findSearch a data directory for pages by number
inno tsidList or find tablespace IDs

Recovery & Repair

CommandDescription
inno recoverAssess page-level recoverability and count salvageable records
inno repairRecalculate and fix corrupt page checksums
inno undeleteRecover deleted records from tablespace
inno corruptIntentionally corrupt pages for testing
inno defragDefragment tablespace, reorder INDEX pages
inno transplantCopy specific pages from a donor into a target tablespace
inno simulateSimulate InnoDB crash recovery levels 1-6

Log & Transaction Analysis

CommandDescription
inno logAnalyze InnoDB redo log files
inno undoAnalyze undo tablespace structure
inno binlogAnalyze MySQL binary log files
inno timelineUnified modification timeline from redo, undo, and binary logs

Backup Analysis

CommandDescription
inno backup diffCompare page LSNs between backup and current tablespace
inno backup chainValidate XtraBackup backup chain LSN continuity

Utilities

CommandDescription
inno completionsGenerate shell completions for bash, zsh, fish, powershell

Global Flags

These flags are available on every subcommand:

FlagDefaultDescription
--color <auto|always|never>autoControl colored terminal output. auto enables color when stdout is a terminal.
--format <text|json|csv>textOutput format. Overrides per-subcommand --json flag. CSV support varies by subcommand.
-o, --output <file>stdoutWrite output to a file instead of printing to stdout.
--audit-log <path>noneAppend structured audit events (NDJSON) to the specified file. Used by write operations (repair, corrupt, defrag, transplant).

Common Flags

Most subcommands also accept these flags (see individual pages for specifics):

FlagDescription
--jsonEmit structured JSON output instead of human-readable text. All subcommands support this.
-v, --verboseShow additional detail (per-page checksums, FSEG internals, MLOG record types, etc.).
--page-size <size>Override the auto-detected page size. Accepts 4096, 8192, 16384 (default), 32768, or 65536.
--keyring <path>Path to a MySQL keyring file for decrypting encrypted tablespaces.

Common Patterns

Page size auto-detection

By default, inno reads the FSP header flags from page 0 to determine the tablespace page size. If page 0 is corrupt or the file uses a non-standard size, use --page-size to override detection.

JSON output

Every subcommand supports --json for machine-readable output. JSON structs are serialized with serde_json and optional fields are omitted when empty. This makes inno suitable for integration into scripts and pipelines:

inno checksum -f table.ibd --json | jq '.invalid_pages'

Encrypted tablespaces

For tablespaces encrypted with MySQL's InnoDB tablespace encryption, provide the keyring file with --keyring. The tablespace key is extracted from the encryption info on page 0, decrypted using the master key from the keyring, and applied transparently to all page reads. Subcommands that support --keyring include parse, pages, dump, checksum, diff, watch, recover, and sdi.

Exit codes

  • 0 -- Success.
  • 1 -- An error occurred, or (for inno checksum) invalid checksums were detected.