~/tools/sql-dump-inspector$
Drop a .sql or .sql.gz from mysqldump, mariadb-dump or pg_dump and see its tables, row counts, version and restore risks, read in your browser.
Published
The file is read in this browser, in slices, and nothing is uploaded. A 10 GB dump takes a few minutes; you can leave the tab open and come back.
~/tools/sql-dump-inspector$cat how-to-use
Drop the dump file above, or choose it: a .sql file from mysqldump, mariadb-dump or pg_dump (plain format), or the same file gzipped. It is read in slices in this browser and never uploaded, so a dump of many GB works; a .gz is unpacked as it is read.
Read the summary: the program and server version that made the dump, its character set, each table with its rows and its size in the dump, and the views, routines and triggers. Rows are counted from the data itself, so one long INSERT with thousands of rows counts as thousands.
Then read the warnings before you restore: a dump that is cut off, one that creates, switches to or drops its own database, DEFINER accounts and owner roles the new server needs, and lines an older client stops on. Copy the summary into your notes or ticket.
~/tools/sql-dump-inspector$cat proof
On a fresh server for each Ubuntu release, the real programs (mariadb-dump, mysqldump, pg_dump and pg_dumpall) made dumps with quotes, new lines and Urdu and Chinese text in them. This tool’s own code read each dump; the mariadb-dump, mysqldump and pg_dump dumps were then restored into an empty database, and SELECT COUNT(*) of every table matched the rows the tool counted. The restores the tool warns about were run too (a cut-off dump, a DEFINER, a missing owner role, a MariaDB dump restored into MySQL), and each printed the error its warning quotes. The run log shows every command and what the server printed.
Ubuntu 26.04.1: passed all 23 checksRead the run log (Ubuntu 26.04.1)
Ubuntu 24.04.5: passed all 23 checksRead the run log (Ubuntu 24.04.5)
Ubuntu 26.04.1
Recorded on the test server just before the first step and again after the last one. Disk used on / (logs written during the run included): +928.7 MB.
Ubuntu 24.04.5
Recorded on the test server just before the first step and again after the last one. Disk used on / (logs written during the run included): +1084.9 MB.
Every command on this page was run on this server and the output shown is what it printed. How we test