INNOCHECKSUM(1)

πŸ’… INNOCHECKSUM(1) β€” the offline InnoDB file checksum utility, bestie ✨

okay so this is the manual for innochecksum, living in the MariaDB Database System corner of your man pages, and honestly? it's giving detective energy. let's get into it πŸ•΅οΈβ™€οΈπŸ’–


✨ NAME ✨

innochecksum β€” offline InnoDB file checksum utility πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

innochecksum [options] file_name

🌸 DESCRIPTION 🌸

so innochecksum prints checksums for InnoDB files, periodt. what it does is read an InnoDB tablespace file, calculate the checksum for each page, compare that calculated checksum against the stored checksum, and then report any mismatches β€” and a mismatch means a damaged page, no cap 😭

it was originally developed to speed up verifying the integrity of tablespace files after power outages, but you can also use it after file copies. and here's why that matters: because checksum mismatches will cause InnoDB to deliberately shut down a running server, it can be preferable to use this tool rather than waiting for a server in production usage to encounter the damaged pages. like, why wait for the meltdown when you can vibe check the file first πŸ’…

bestie, listen: innochecksum cannot be used on tablespace files that the server already has open. for those, you should use CHECK TABLE to check tables within the tablespace. that's the rule 🫢

if checksum mismatches are found, you would normally restore the tablespace from backup, or start the server and attempt to use mariadb-dump to make a backup of the tables within the tablespace.

invoke innochecksum like this:

shell> innochecksum [options] file_name

innochecksum supports the following options. for options that refer to page numbers, the numbers are zero-based. yes, zero. we start counting at 0 here, iconic behavior ✨


πŸ‘‘ OPTIONS πŸ‘‘

  • -?, --help β€” displays help and exits. your lil "what is happening" button πŸ’–
  • -a num, --allow-mismatches=# β€” maximum checksum mismatch allowed before innochecksum terminates. defaults to 0, which terminates on the first mismatch. so yeah, default is zero tolerance, she's strict 😀
  • -c, --count β€” print a count of the number of pages in the file. page census πŸ“Š
  • -e num, --end-page=# β€” end at this page number.
  • -i, --per-page-details β€” print out per-page detail information. the receipts, per page 🧾
  • -I, --info β€” synonym for --help.
  • -f, --leaf β€” examine leaf index pages. πŸƒ
  • -l fn, --log=fn β€” log output to the specified filename, fn.
  • -m num, --merge=# β€” leaf page count if merge given number of consecutive pages.
  • -n, --no-check β€” ignore the checksum verification. until MariaDB 10.6, must be used with the --write option. πŸ‘€
  • -p num, --page-num=# β€” check only this page number. one page, main character energy πŸ‘‘
  • -D name, --page-type-dump=name β€” dump the page type info for each page in a tablespace.
  • -S, --page-type-summary β€” display a count of each page type in a tablespace.
  • -s num, --start-page β€” start at this page number.
  • -u, --skip-corrupt β€” skip corrupt pages. we're not looking at that rn πŸ™ˆ
  • -C name, --strict-check=name β€” specify the strict checksum algorithm. one of: crc32, innodb, none. if not specified, validates against innodb, crc32 and none. removed in MariaDB 10.6. πŸ’€
  • -w name, --write=name β€” rewrite the checksum algorithm. one of crc32, innodb, none. an exclusive lock is obtained during use. use in conjunction with the -no-check option to rewrite an invalid checksum. removed in MariaDB 10.6. πŸ’€
  • -v, --verbose β€” verbose mode; print a progress indicator every five seconds. she talks a lot, we love her πŸ—£οΈπŸ’–
  • -V, --version β€” displays version information and exits.

copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2025 MariaDB Foundation

this documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

this documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details.

you should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.


πŸ”— SEE ALSO πŸ”—

for more information, please refer to the MariaDB Documentation, available online at https://mariadb.com/docs/ β€” go read it, iykyk πŸ“šβœ¨


🫢 AUTHOR 🫢

MariaDB Foundation (http://www.mariadb.org/). slay πŸ’…


and that's the whole page, bestie!! this one came from MariaDB 11.8, dated 5 March 2025, and it's the INNOCHECKSUM(1) page πŸŽ€πŸ’–βœ¨ go check those tablespace files, you got this πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from