This is the official DBRecover for MySQL 2611 user manual. Version 2611 runs without Java and replaces the graphical interface with an interactive terminal UI and the command line. DBRecover for MySQL is free software and can be used without a license purchase. Work on copied database files whenever possible. DBRECOVER for MySQL

This manual explains how to recover table definitions and rows from offline MySQL files with DBRecover for MySQL 2611, in its interactive terminal UI and on the command line. It is written for operators who have database files to recover, not for developers extending the tool.

Every screen shown here was captured from dbrecover 2611 running on sample data. Paths are shown as /data/recovery/...; on Windows the screens are the same, with Windows paths. Work on copied files whenever possible.

What Changed in 2611

2611 is a rewrite of DBRecover for MySQL as one small native program.
  • No Java any more. Nothing to install: unzip and run. The package is about 6 MB instead of about 150 MB with a bundled JRE.
  • No GUI any more. The graphical window is replaced by an interactive terminal UI that works in any console and over SSH, and the classic command line stays for scripts. Every recovery flow of the former GUI is in the terminal UI, under the same names.
  • One package for Windows and Linux: dbrecover-mysql-2611.zip holds dbrecover.exe for Windows 10 / Server 2016 or later (64-bit) and dbrecover for any x86_64 Linux.
  • Same results. Command-line options are unchanged, and the exported SQL, DDL and CSV are the same as those of version 2610. It is faster and needs far less memory: a full dictionary export of a 142-table, 5.9 GB MySQL 8 datadir took 84 s with about 25 MB of memory, against 200 s and 350 to 770 MB for the Java version.

Before You Start

Prepare the files for the scenario you are recovering:

  • MySQL 8.x single-table recovery: the table .ibd file.
  • MySQL 8.x datadir recovery: the datadir containing schema directories and mysql.ibd.
  • MySQL 5.x or MariaDB single-table recovery: the table .ibd file plus the matching .frm file.
  • MySQL 5.x or MariaDB datadir recovery: ibdata1, schema directories, .frm files, and table data files.
  • Dropped table recovery: mysql.ibd, ibdata1, or DD page files; the original datadir or carved page directory improves export results.
  • Disk image scan: a raw disk image, filesystem image, or copied block device image.

Download and Start

Download dbrecover-mysql-2611.zip and unzip it. The folder dbrecover-mysql-2611/ contains:

SystemProgramTerminal UI launcher
Windows 10 / Server 2016 or later, 64-bitdbrecover.exedbrecover-tui.bat
Linux, any x86_64 distribution (static binary)dbrecoverdbrecover-tui.sh

plus README.txt, 使用说明.txt and NOTICE.txt. No Java runtime and no running MySQL server are needed, and the files you open are never modified.

bash
dbrecover-tui.bat                  # Windows: double-click it, or run it in a console
./dbrecover-tui.sh                 # Linux
dbrecover --tui /data/recovery     # either system: open a file or directory right away
dbrecover --help                   # the command-line options

Running dbrecover in a terminal without any argument also starts the terminal UI. If the Linux files lost their executable bit while unzipping, run chmod +x dbrecover dbrecover-tui.sh.

The Terminal UI

The terminal UI prints a two-line banner and the main menu. Its first three rows are the three situations you may be in; the menu comes back after every action:

dbrecover --tui
DBRecover for MySQL Version 2611
English · Log: log_dbrecover.txt

? Choose an action
❯ The files are available          open and export tables (.ibd / .MYD / .frm / .page files, or a data directory)
  A table or database was dropped  recover it (DROP TABLE / DROP DATABASE)
  The files are gone or damaged    scan a disk image for InnoDB pages
  Preferences...                   export, data view and language options
  Exit
  ↑↓ move · Enter select · Esc back

Keys: ↑ ↓ move and Enter selects; Esc goes back one step (on the main menu it asks whether to exit); lists longer than 8 rows filter as you type; Tab completes paths, and most terminals also accept a path dragged into the window. Each finished step stays in the terminal as one line marked ✔, and the full log is written to log_dbrecover.txt in the working directory.

When an export finishes, the UI prints the same action as a command (Same thing from a script: dbrecover ...), so a recovery done once interactively can be repeated from a script.

Start optionEffect
[path]File or directory to open right away
--lang en|zh|ja|esInterface language (default: the Preferences, then the system locale)
--plainNumbered menus without colours or redraw; automatic when input or output is piped
--no-colorNo colours (the NO_COLOR environment variable works too)
--glyphs rich|safe|asciiSymbol set; use ascii when frames are misaligned or characters show as boxes

Scenario 1: Choose the Right Recovery Workflow

The main menu replaces the former Recovery Wizard. Its rows ask what happened to the data, not which tool or MySQL version to use; nothing is asked that the files can tell themselves (the InnoDB page size, 4K to 64K, and whether a directory is MySQL 8 or MySQL 5.x/MariaDB are detected).

Main menu rowWhere it leads
The files are availableAsks for a path under the title Open... and opens it where it belongs (see the next table).
A table or database was droppedDrop Recovery: asks for mysql.ibd / ibdata1 / DD pages, Datadir (optional) and Scan output (optional), then analyses (scenario 6).
The files are gone or damagedDisk Image Scan: asks for Disk Image and Output Dir, then scans (scenario 7).
Preferences...Export, data view, language and terminal options (scenario 9).
Open...
✔ Choose an action · The files are available
? Open... › /data/recovery/db1/ibd_test_comprehensive.ibd
  Enter confirm · Tab complete · Esc back
What you openWhere it goes
An .ibd, .MYD or .page file, or a .frmThe table view (scenarios 2 and 4)
A directory with mysql.ibd, another folder of table files, or carved pagesDictionary Mode, scanned at once (scenarios 3 and 8)
A directory with ibdata1 and no mysql.ibd, or ibdata1 itselfMariaDB/MySQL5 Datadir Recovery, analysed at once (scenario 5)
Any other fileTaken for a disk image: Disk Image Scan (scenario 7)

Scenario 2: Recover One MySQL 8.x .ibd Table

Use this scenario when you have a standalone MySQL 8.x .ibd file. MySQL 8.x tables contain SDI metadata, so the table structure is read from the file itself, without a .frm.

In the Terminal UI

  1. Choose The files are available and type the path of the .ibd file (or start with dbrecover --tui orders.ibd).
  2. The table view opens. Its first five items are the former Data, Columns, DDL, SDI and Info tabs; the others are the table's actions.
table view
✔ Reading ibd_test_comprehensive.ibd · 00:00
● db1.ibd_test_comprehensive
  ⎿  /data/recovery/db1/ibd_test_comprehensive.ibd

db1.ibd_test_comprehensive
? Tab or action  › type to filter
❯ Data                                table data (rows) · Rows: 1,000, Include deleted: off
  Columns                             column definitions
  DDL                                 table DDL (CREATE TABLE)
  SDI                                 the JSON MySQL 8 stores in the tablespace
  Info                                file and recovery metadata
  Count Rows                          live and deleted
  Export DDL...                       save the CREATE TABLE statement
  Export Data...                      SQL file with structure and rows, ready to import
  Export CSV...                       CSV with a header line
  Rows / Include deleted              change the Data options, then reload
  Associate .frm File (MySQL 5.x)...  for a MySQL 5.x / MariaDB file without SDI
  Associate DDL (CREATE TABLE)...     a file that holds the CREATE TABLE statement
  Close
  ↑↓ move · Enter select · type to filter · Esc back
  1. Data browses the rows: ↑↓, PgUp/PgDn move, ←→ shift columns, Enter shows one whole record, q goes back.
Data
✔ Loading the data of db1.ibd_test_comprehensive · 100 rows · 00:00
db1.ibd_test_comprehensive · rows 1-20 of 100 · columns 1-7 of 73
    id  col_tinyint_s  col_tinyint_u  col_smallint_s  col_smallint_u  col_mediumint_s  col_mediumint_u
  ────  ─────────────  ─────────────  ──────────────  ──────────────  ───────────────  ───────────────
❯    1           -127              2          -32668             500         -8378608           100000
     2           -126              4          -32568            1000         -8368608           200000
     3           -125              6          -32468            1500         -8358608           300000
     4           -124              8          -32368            2000         -8348608           400000
     5           -123           NULL          -32268            NULL         -8338608             NULL
     ...
  Rows: 1,000, Include deleted: off
  ↑↓ rows · ←→ columns · Enter record · q back
  1. Rows / Include deleted sets the preview size and whether deleted records are shown, then reloads. Start with a small preview; include deleted records only when you need them.
Rows / Include deleted
✔ Tab or action · Rows / Include deleted
✔ Rows · 1000
✔ Include deleted? · No
  Reload: Rows: 1,000, Include deleted: off
✔ Loading the data of db1.ibd_test_comprehensive · 100 rows · 00:00
  1. DDL shows the generated CREATE TABLE. If the table name, columns or indexes look wrong, stop and verify that the file comes from the expected table.
  2. Columns lists names, types, attributes and indexes; check them before exporting data.
Columns
Columns · db1.ibd_test_comprehensive · rows 1-20 of 77
     #  Column                  Type                              Attributes
  ────  ──────────────────────  ────────────────────────────────  ────────────────────────────────
❯    1  id                      bigint unsigned                   NOT NULL AUTO_INCREMENT COMMENT…
     2  col_tinyint_s           tinyint                           NOT NULL DEFAULT '-50' COMMENT …
     3  col_tinyint_u           tinyint unsigned                  DEFAULT '200' COMMENT 'TINYINT…
     ...
  17 index(es): PRIMARY KEY (`id`); UNIQUE KEY `uk_char_ascii` (`col_char_ascii_10`, `col_char_ascii_20`); KE
  1. Info shows file size, page count, the detected page size, where the structure comes from, row format, charset and counts. Count Rows counts live and deleted records.
Info
● Info · db1.ibd_test_comprehensive
  Name               db1.ibd_test_comprehensive
  Path               /data/recovery/db1/ibd_test_comprehensive.ibd
  Size               608 KB (622,592 bytes)
  Format             InnoDB tablespace (.ibd)
  Pages              38
  Page size          16384 bytes (detected)
  Table metadata     SDI
  Engine             InnoDB
  Row format         DYNAMIC
  Default charset    utf8mb4
  Default collation  utf8mb4_unicode_ci
  Auto increment     1
  Comment            IBD解析器综合测试表 - 包含所有支持的字段类型
  Columns            77
  Indexes            17
Count Rows
✔ Counting rows of db1.ibd_test_comprehensive · 100 rows · 00:00
● Row Count
  ⎿  Table: db1.ibd_test_comprehensive
     Rows: 100
     Deleted rows: 7
  Enable "Include deleted" to look at the deleted records that can still be read.

Export the Recovered Table

  1. Export DDL... saves the CREATE TABLE statement (default ./export/<table>_ddl.sql).
  2. Export Data... writes an importable SQL file with structure and rows (default ./export/<table>.sql).
  3. Export CSV... writes CSV with a header line (default ./export/<table>.csv).
  4. Press Enter to accept the proposed file or type another one; an existing file is only overwritten after you confirm. A progress bar shows rows written and time left; Esc stops the export.
  5. Check row count, text encoding and representative rows before using the output in another database.
Export DDL... / Export Data... / Export CSV...
✔ Export DDL... · /data/recovery/export/ibd_test_comprehensive_ddl.sql
✔ Exporting db1.ibd_test_comprehensive · 00:00
✔ DDL exported to: /data/recovery/export/ibd_test_comprehensive_ddl.sql
  Same thing from a script:  dbrecover --ddl --out /data/recovery/export/ibd_test_comprehensive_ddl.sql /data/recovery/db1/ibd_test_comprehensive.ibd
✔ Tab or action · Export Data...
✔ Export Data... · /data/recovery/export/ibd_test_comprehensive.sql
✔ Exporting db1.ibd_test_comprehensive · 100 rows, 406 KB · 00:00
✔ Exported to: /data/recovery/export/ibd_test_comprehensive.sql
  Same thing from a script:  dbrecover --ddl --sql --complete-insert --out /data/recovery/export/ibd_test_comprehensive.sql /data/recovery/db1/ibd_test_comprehensive.ibd
  Before using the file, check the row count, the text encoding and a few representative records.
✔ Tab or action · Export CSV...
✔ Export CSV... · /data/recovery/export/ibd_test_comprehensive.csv
✔ Exporting db1.ibd_test_comprehensive as CSV · 100 rows, 246 KB · 00:00
✔ CSV exported to: /data/recovery/export/ibd_test_comprehensive.csv

From the Command Line

bash
dbrecover --ddl orders.ibd                              # CREATE TABLE
dbrecover --ddl --sql --out orders.sql orders.ibd       # importable SQL: structure and rows
dbrecover --sql --limit=1000 --out sample.sql orders.ibd
dbrecover --csv --out orders.csv orders.ibd
dbrecover --count orders.ibd                            # Table / Rows / Deleted rows
dbrecover --print-sdi orders.ibd                        # the SDI JSON

Scenario 3: Recover Many MySQL 8.x Tables from a Datadir

Use Dictionary Mode when you have a MySQL 8.x datadir and want to recover many tables in one pass.

In the Terminal UI

  1. Choose The files are available and give the datadir (or start with dbrecover --tui /data/recovery/mysql8). A directory with mysql.ibd is recognised as a MySQL 8 datadir and scanned at once.
  2. The Dictionary Mode menu has the buttons of the former dialog:
Dictionary Mode
● Dictionary Mode - Scan Directory
  ⎿  Scan: /data/recovery/mysql8
✔ Scanning... · Found 128 object(s) · 00:00

mysql8
? Dictionary Mode  › type to filter
❯ Browse Tables...       Found 128 object(s)
  Export All DDL...      table structures, one .sql per table; do this first
  Export All Data...     SQL data files, one per table
  Export All CSV...      CSV files, one per table
  Export Schema Dump...  one importable dump per schema
  Drop Recovery...       dropped tables and databases, from mysql.ibd
  Other DDL objects      views, routines, triggers and events
  Scan                   scan again
  Close
  ↑↓ move · Enter select · type to filter · Esc back
  1. Browse Tables... lists the schemas, then their tables (type to filter), and opens the table view of scenario 2.
Browse Tables... › Schema
mysql8
? Schema
❯ dr80         59 tables
  dr80_dropdb  1 table
  mysql        68 tables
  ↑↓ move · Enter select · Esc back
Browse Tables... › Table
mysql8 › dr80
? Table  › sakila
❯ classic_sakila_actor             MySQL 8.0.46 · Dynamic · classic_sakila_actor.ibd
  classic_sakila_customer          MySQL 8.0.46 · Dynamic · classic_sakila_customer.ibd
  classic_sakila_film              MySQL 8.0.46 · Dynamic · classic_sakila_film.ibd
  classic_sakila_inventory         MySQL 8.0.46 · Dynamic · classic_sakila_inventory.ibd
  classic_sakila_payment           MySQL 8.0.46 · Dynamic · classic_sakila_payment.ibd
  classic_sakila_rental            MySQL 8.0.46 · Dynamic · classic_sakila_rental.ibd
  ↑↓ move · Enter select · type to filter · Esc back
  1. Export All DDL..., Export All Data..., Export All CSV... and Export Schema Dump... ask for an output directory; data, CSV and dump exports also ask for a row limit per table (0 = no limit).
  2. Export Complete shows the totals; when tables were skipped you can look at the reasons.
  3. Other DDL objects shows the views, routines, triggers and events stored in mysql.ibd.
Export All DDL... / Export Schema Dump...
✔ Dictionary Mode · Export All DDL...
✔ Select Export Directory for DDL · /data/recovery/export/ddl
✔ Exporting DDL for 128 tables · 00:01
● Export Complete
  ⎿  Dictionary per-table exported: DDL 128 table(s), SQL 0 table(s), CSV 0 table(s); skipped/data unavailable 0 export(s)
     /data/recovery/export/ddl
  Same thing from a script:  dbrecover --dict --dict-export-ddl-dir /data/recovery/export/ddl /data/recovery/mysql8
  Recommended next: spot-check a few large and small tables, then export data or CSV.
✔ Dictionary Mode · Export Schema Dump...
✔ Select Export Directory for Schema Dumps · /data/recovery/export/dump
✔ Row limit per table (0 = no limit) · 1000
✔ Exporting Schema Dumps for 128 tables · 00:01
● Export Complete
  ⎿  Dictionary schema dumps exported: 3 schema(s), 128 table(s); skipped/data unavailable 0 table(s)
     /data/recovery/export/dump
  Same thing from a script:  dbrecover --dict --dict-export-dump-dir /data/recovery/export/dump --limit 1000 --complete-insert /data/recovery/mysql8

From the Command Line

bash
dbrecover --dict /data/recovery/mysql8                  # list the tables found
dbrecover --dict /data/recovery/mysql8 \
  --dict-export-ddl-dir out/ddl \
  --dict-export-sql-dir out/sql \
  --dict-export-csv-dir out/csv
dbrecover --dict /data/recovery/mysql8 --dict-export-dump-dir out/dump --limit=1000
dbrecover --dd-extra-ddl --out extra-ddl.sql /data/recovery/mysql8/mysql.ibd
  1. Export DDL first.
  2. Review a few large and small tables.
  3. Export a small batch with a row limit before exporting all data from a large datadir.
  4. Use Preferences to set a default export row limit if you need a bounded first pass.

Scenario 4: Recover One MySQL 5.x or MariaDB .ibd Table with .frm

Use this scenario when the source table is from MySQL 5.x or MariaDB. These tables do not contain MySQL 8 SDI metadata, so DBRecover needs the matching .frm file or a compatible CREATE TABLE statement.

Inspect the .frm File First

Open the .frm itself through The files are available. With the .ibd next to it, the table view opens with both; a .frm on its own opens as "Table definition only", where DDL, Columns and Info work and the data items are marked unavailable.

Associate the .frm with the .ibd

  1. When the .frm sits next to the .ibd under the same name, just open the .ibd: the .frm is used automatically.
  2. Otherwise the UI reports that no table appeared under the file and puts the cursor on Associate .frm File (MySQL 5.x)...:
table view of a MySQL 5.7 .ibd without .frm
✔ Reading business_orders.ibd · no table metadata · 00:00
● business_orders.ibd
  ⎿  /data/recovery/copy/business_orders.ibd
! No table appeared under this file: it has no MySQL 8 SDI metadata that could be read.
  no SDI data found by scanning all pages
  A MySQL 5.x or MariaDB file needs its matching .frm or DDL: use "Associate .frm File (MySQL 5.x)..." or "Associate DDL (CREATE TABLE)..." below.

copy.business_orders
? Tab or action  › type to filter
     ...
❯ Associate .frm File (MySQL 5.x)...  for a MySQL 5.x / MariaDB file without SDI
  Associate DDL (CREATE TABLE)...     a file that holds the CREATE TABLE statement
  Close
  1. Select it and give the path of the matching .frm. Associate DDL (CREATE TABLE)... takes a file with the statement instead.
Associate .frm File (MySQL 5.x)...
✔ Associate .frm File (MySQL 5.x)... · /data/recovery/shop/business_orders.frm
✔ Reading the structure of copy.business_orders · 00:00
✔ Table structure associated: shop.business_orders
  Look at DDL, Columns and Data before exporting.

Export the Table

  1. Review DDL and Columns.
  2. Preview rows in Data with a small row limit.
  3. Export DDL, then SQL or CSV after the preview looks correct.
  4. If values are shifted into the wrong columns, verify that the .frm is from the exact same table definition.
bash
dbrecover --ddl --frm orders.frm orders.ibd
dbrecover --ddl --sql --frm orders.frm --out orders.sql orders.ibd
dbrecover --csv --frm orders.frm --out orders.csv orders.ibd
dbrecover --sql --table-ddl-file create_orders.sql --out orders.sql orders.ibd
dbrecover --sql --out myisam_table.sql myisam_table.MYD     # MyISAM: .MYD with its .frm

Scenario 5: Recover a MySQL 5.x or MariaDB Datadir

Use this workflow when you have a datadir containing ibdata1, .frm files, and table data files.

In the Terminal UI

  1. Choose The files are available and give the datadir (a directory with ibdata1 and no mysql.ibd), or ibdata1 itself.
  2. The UI parses ibdata1 at once and reports the tables found, with the counts of missing .ibd and .frm files:
MariaDB/MySQL5 Datadir Recovery
  This directory has ibdata1 and no mysql.ibd: a MySQL 5.x / MariaDB data directory.
● MariaDB/MySQL5 Datadir Recovery
  ⎿  Datadir: /data/recovery/mysql57
✔ Parsing ibdata1... · Found 61 table(s) (1 missing .ibd, 1 missing .frm) · 00:00
  Same thing from a script:  dbrecover --mariadb-datadir /data/recovery/mysql57
  Some tables have no data file. If .page files were carved from a disk image, set "Page Set Root" to the page set root.

mysql57
? MariaDB/MySQL5 Datadir Recovery  › type to filter
❯ Browse Tables...       61 table(s)
  Export DDL...          table structures, one .sql per table; do this first
  Export Data...         SQL data files, one per table
  Export CSV...          CSV files, one per table
  Export Schema Dump...  one importable dump per schema
  Page Set Root          not set; the root of carved .page files, if there are any
  Drop Recovery...       tables whose records in ibdata1 are deleted
  Analyze                read ibdata1 again
  Close
  ↑↓ move · Enter select · type to filter · Esc back
  1. If you already carved .page files from a disk image, set Page Set Root to the page set root; tables without a data file take their rows from there.
  2. Browse Tables... shows for each table whether its data, .frm and columns were found:
Browse Tables...
mysql57 › dr57
? Table  › type to filter

❯ audit_log                        Data: OK · .frm: OK · Columns: 11/11
  bulk_rows                        Data: OK · .frm: OK · Columns: 7/7
     ...
  classic_mw_recentchanges         Data: OK · .frm: OK · Columns: 14/14
  ↓ 45 more
  ↑↓ move · Enter select · type to filter · Esc back
  1. Export with Export DDL..., Export Data..., Export CSV... or Export Schema Dump..., then check the summary for skipped tables.
Export DDL...
✔ MariaDB/MySQL5 Datadir Recovery · Export DDL...
✔ Select Export Directory for DDL · /data/recovery/export57/ddl
✔ Exporting DDL for 61 tables · 00:00
● Export Complete
  ⎿  Active per-table exported: 61 table(s)
     Schema dumps exported: 0 schema(s), 0 table(s)
     /data/recovery/export57/ddl
  Same thing from a script:  dbrecover --mariadb-datadir /data/recovery/mysql57 --dict-export-ddl-dir /data/recovery/export57/ddl

From the Command Line

bash
dbrecover --mariadb-datadir /data/recovery/mysql57 --list-tables
dbrecover --mariadb-datadir /data/recovery/mysql57 \
  --dict-export-ddl-dir out/ddl \
  --dict-export-sql-dir out/sql \
  --dict-export-csv-dir out/csv \
  --dict-export-dump-dir out/dump
dbrecover --ibdata1 /data/recovery/mysql57/ibdata1 --list-tables
  1. Confirm that ibdata1 comes from the same datadir as the .frm and .ibd files.
  2. Export DDL first to verify table names and column definitions.
  3. Use CSV for quick spot checks.
  4. Use schema dumps when you want a single importable output per schema.

Scenario 6: Recover Dropped Tables or Dropped Databases

Use Drop Recovery when tables were dropped but metadata may still be present in mysql.ibd, ibdata1, or carved data dictionary pages.

In the Terminal UI

  1. Choose A table or database was dropped in the main menu (or Drop Recovery... in Dictionary Mode or Datadir Recovery).
  2. Answer the three questions of the former Configuration:
    • mysql.ibd / ibdata1 / DD pages: mysql.ibd or a directory of recovered DD .page files for MySQL 8; ibdata1 for MySQL 5.x/MariaDB. A data directory works too: the dictionary is looked up in it.
    • Datadir (optional): helps to locate the table .ibd files for data export.
    • Scan output (optional): the carved page root (or a folder of leftover table files) when the original table files are missing.
  3. The dictionary is analysed and the menu shows what was found:
A table or database was dropped
✔ Choose an action · A table or database was dropped
● Drop Recovery
  ⎿  For tables that were dropped while their metadata may still be in mysql.ibd, ibdata1 or carved data dictionary pages.
✔ mysql.ibd / ibdata1 / DD pages · /data/recovery/mysql8-dropped
  Datadir: if available, it helps to locate the table .ibd files and export data.
✔ Datadir (optional) · /data/recovery/mysql8-dropped
  Scan output: the carved page root, for when the original table files are missing.
✔ Scan output (optional) · /data/recovery/pages
✔ Analyzing the dictionary · Found 1 dropped schema(s), 5 dropped table(s) · 00:00
  Same thing from a script:  dbrecover --drop-list --mysql-ibd /data/recovery/mysql8-dropped/mysql.ibd
  Treat dropped-table recovery as best effort: export DDL first; SQL or CSV only where the table pages are still available.

Drop Recovery › mysql.ibd
? Drop Recovery
  Dropped Schemas     1
❯ Dropped Tables      5
  Export Selected...  DDL, SQL and CSV of one table
  Export All...       every dropped table, with schema dumps
  Configuration       Datadir: /data/recovery/mysql8-dropped · Scan output: /data/recovery/pages
  Analyze             read the dictionary again
  Close
  ↑↓ move · Enter select · Esc back
  1. Dropped Schemas and Dropped Tables list the dropped objects with their dictionary IDs:
Dropped Tables
Dropped Tables · rows 1-5 of 5
  Source    ID  Table                             Columns
  ──────  ────  ────────────────────────────────  ───────
❯ MySQL8   229  sys.sys_config
  MySQL8   363  performance_schema.innodb_redo_…
  MySQL8   369  dr80.drop_victim
  MySQL8   371  dr80_dropdb.victim
  MySQL8   428  performance_schema.innodb_redo_…
  Names come from deleted dictionary records; damaged ones may look garbled
  ↑↓ rows · ←→ columns · Enter record · q back
  1. Export Selected... exports one table into ddl/, sql/ and csv/ under the chosen directory; Export All... exports every dropped table and adds schema dumps in dump/. Tables whose pages cannot be found are skipped, and you can look at the reasons.
Export All...
✔ Drop Recovery · Export All...
✔ Select Export Directory · /data/recovery/drop-all
✔ Recovering dropped tables · 00:00
● Export Complete
  ⎿  Drop schema dumps exported: 2 schema(s), 2 table(s); skipped 3 table(s)
     Drop table exports: DDL: 2 file(s), SQL: 2 file(s), CSV: 2 file(s); skipped 3 table(s)
     /data/recovery/drop-all
  Same thing from a script:  dbrecover --drop-list --mysql-ibd /data/recovery/mysql8-dropped/mysql.ibd --datadir /data/recovery/mysql8-dropped --search-root /data/recovery/pages --drop-export-ddl-dir /data/recovery/drop-all/ddl --drop-export-sql-dir /data/recovery/drop-all/sql --drop-export-csv-dir /data/recovery/drop-all/csv --drop-export-dump-dir /data/recovery/drop-all/dump --complete-insert
! 6 item(s) were skipped or had no data.
? Look at the reasons?  (y/N)

From the Command Line

bash
dbrecover --drop-list --mysql-ibd /data/recovery/mysql8-dropped/mysql.ibd      # list (prints the IDs)
dbrecover --drop-list --mysql-ibd /data/recovery/mysql8-dropped/mysql.ibd \
  --datadir /data/recovery/mysql8-dropped --search-root /data/recovery/pages \
  --drop-export-ddl-dir out/ddl --drop-export-sql-dir out/sql \
  --drop-export-csv-dir out/csv --drop-export-dump-dir out/dump
dbrecover --drop-list --mysql-ibd /data/recovery/mysql8-dropped/mysql.ibd \
  --search-root /data/recovery/pages --drop-table-id 369 --drop-export-sql-dir out/sql
dbrecover --mariadb-datadir /data/recovery/mysql57 --delete=with \
  --search-root out/pages --dict-export-dump-dir out/dump              # MySQL 5.x / MariaDB
  1. Treat dropped-table recovery as best effort: export DDL first.
  2. Prefer the original datadir when it is still available.
  3. Use carved pages only when the original table file is missing or damaged.
  4. With ibdata1 as the source only Export All... is offered.

Scenario 7: Carve InnoDB Pages from a Disk Image

Use Disk Image Scan when you do not have clean .ibd files, but you have a raw disk image or filesystem image.

In the Terminal UI

  1. Choose The files are gone or damaged and give the disk image.
  2. Give an empty Output Dir with enough free space (default disk-pages-out). There is nothing else to set: the page size is found by sampling the image, every 512-byte sector is examined, and the pages that hold rows are kept.
  3. The scan shows its progress; Esc stops it and keeps the pages found so far.
  4. After === Scan Complete ===, continue with Recover Tables... (Dictionary Mode on the output) or Drop Recovery... (the output as page root for dropped tables).
The files are gone or damaged
✔ Choose an action · The files are gone or damaged
● Disk Image Scan
  ⎿  For when there is no clean .ibd file but a raw disk image or file-system image. Keep the original image read-only. The page size is found by sampling the image.
✔ Disk Image · disk.img
✔ Output Dir · /data/recovery/disk-pages-out
  Image   /data/recovery/disk.img (17.6 MB)
  Output  /data/recovery/disk-pages-out
✔ Scanning disk.img · 625 pages · 00:00
● === Scan Complete ===
  ⎿  /data/recovery/disk-pages-out
  Page Size           16384 bytes (detected)
  Bytes scanned       18457088
  Candidates          627
  Pages written       625
  Leaf index written  584
  BLOB pages written  0
  LOB pages written   39
  Errors              0
  Same thing from a script:  dbrecover --disk-scan --disk-image /data/recovery/disk.img --disk-out-dir /data/recovery/disk-pages-out
? Continue with the recovered page set
❯ Recover Tables...  dictionary recovery on the scan output
  Drop Recovery...   use the scan output as page root for dropped tables
  Close
  ↑↓ move · Enter select · Esc back

From the Command Line

bash
dbrecover --disk-scan --disk-image disk.img --disk-out-dir out/pages
dbrecover --dict out/pages                                  # tables found in the carved pages
dbrecover --sql --frm orders.frm --out orders.sql out/pages/spaces/space_57
  1. Scan to a directory with enough free space.
  2. Keep the original disk image read-only.
  3. Check the Page Size in the result; if the image is too damaged for it to be detected, set it under Preferences > Advanced (or --page-size) and scan again.

Scenario 8: Open a Directory Directly

Open any folder of .ibd, .MYD or .page files through The files are available. It is scanned in Dictionary Mode; Browse Tables... leads to the schemas, the tables and the table view with Data, Columns, DDL, SDI and Info. For a MySQL 5.x file whose structure was not found, use Associate .frm File (MySQL 5.x)... or Associate DDL (CREATE TABLE)... in its table view, then export from there. Esc leads back to the batch exports.

Scenario 9: Configure Export, Preview, and Language Preferences

Choose Preferences... in the main menu. A change applies at once and is saved in ~/.dbrecover-mysql/tui.properties (the same file as in 2610).

Preferences...
✔ Choose an action · Preferences...
? Preferences
❯ Export     Row limit 0 = no limit
  Data View  Default row limit 1000
  Language   System language
  Advanced   InnoDB page size Auto-detect
  Terminal   Symbols auto
  Close
  ↑↓ move · Enter select · Esc back
Preferences › Export
✔ Preferences · Export
  These settings apply when using Export Data or Export CSV.

Preferences › Export
? Export
❯ Row limit                                0 = no limit
  Include column names in INSERT           ● on
  Use REPLACE INTO instead of INSERT INTO  ○ off
  Include deleted records                  ○ off
  OK
  ↑↓ move · Enter select · Esc back
CategoryOptionDefault
ExportRow limit (0 = no limit); Include column names in INSERT; Use REPLACE INTO instead of INSERT INTO; Include deleted records0; on; off; off
Data ViewDefault row limit; Include deleted records1000; off
LanguageSystem language, English, Chinese (Simplified), Japanese, SpanishSystem language
AdvancedInnoDB page size: Auto-detect, 4K to 64KAuto-detect
TerminalSymbols: auto, rich, safe, asciiauto

Leave the page size on Auto-detect; set one only when a damaged file is read with the wrong size. The command-line equivalents are --limit, --complete-insert, --replace, --delete=with and --page-size; the language can also be chosen at start with --lang.

Scenario 10: Verify and Use the Exported Files

Always verify exported results before importing them into production.

Operation Flow

  1. Open the exported DDL.
  2. Confirm schema name, table name, engine, charset, columns, and indexes.
  3. Open the exported SQL or CSV.
  4. Check the header, row count, NULL values, binary values, dates, and text encoding (all output is UTF-8).
  5. Import into a temporary database first.
  6. Compare row counts (Count Rows or dbrecover --count) and representative rows.
  7. Repeat the export with a different row limit or with Include deleted if the first pass did not contain the rows you need.

Troubleshooting

SymptomWhat to Check
No table appears under an .ibd fileConfirm the file is MySQL 8 with SDI, or associate a matching .frm/DDL for MySQL 5.x (scenario 4). On the command line the error is no SDI data found by scanning all pages; add --frm or --table-ddl-file.
Data shows columns but no rowsCheck the page size on Info, the table structure, and whether the table file actually contains clustered index pages.
Export is too largeSet a row limit in Preferences (or --limit), then re-run the export.
Dropped table DDL is found but data is missingProvide the original datadir or a carved page root so the table pages can be located.
Disk scan finds few pagesCheck the detected page size in the scan result; force it with Preferences > Advanced or --page-size if the image is badly damaged.
Frames are misaligned, or boxes / question marks appearStart with --glyphs ascii (or --glyphs safe in PuTTY and old consoles), or set Symbols under Preferences > Terminal.
Chinese text is garbledThe terminal is not UTF-8; use --lang en or switch the terminal to UTF-8.
Permission denied on LinuxRestore the executable bit: chmod +x dbrecover dbrecover-tui.sh.
An action failed with a one-line errorThe full error is in log_dbrecover.txt in the working directory.

Command-Line Reference

The command line is the same program without the menus, for scripts and batch work. Results go to standard output or to --out; progress and log lines go to standard error and log_dbrecover.txt. Options are unchanged from version 2610: a script that called java -jar dbrecoverj-2610-all.jar only needs dbrecover instead. dbrecover --help lists every option.

TaskOptions
Table structure, rows, CSV, count--ddl, --sql, --csv, --count, --out FILE, --limit=N, --complete-insert, --replace, --delete=with|only
Structure from MySQL 5.x / MariaDB--frm FILE, --table-ddl-file FILE, --table-ddl SQL
MySQL 8 metadata--print-sdi, --select-schema, --select-table, --dd-extra-ddl
MySQL 8 datadir (Dictionary Mode)--dict, --dict-export-ddl-dir, --dict-export-sql-dir, --dict-export-csv-dir, --dict-export-dump-dir
MySQL 5.x / MariaDB datadir--mariadb-datadir DIR, --ibdata1 FILE, --list-tables, --search-root DIR
Dropped tables (MySQL 8)--drop-list, --mysql-ibd, --datadir, --search-root, --drop-table-id, --drop-export-ddl-dir, --drop-export-sql-dir, --drop-export-csv-dir, --drop-export-dump-dir
Pages and disk images--scan --scan-out-dir DIR, --disk-scan --disk-image FILE --disk-out-dir DIR, --disk-step, --index-id, --detect-page-size, --page-size

Exit codes: 0 success; 2 invalid input, missing file, parse failure or command-line error (with several inputs, the run continues and returns 2 if any input failed).

Plain Mode

When input or output is not a terminal, or with --plain, the terminal UI becomes a numbered line-by-line dialogue: type the number and press Enter, 0 goes back. For example, open a table, count its rows (6), go back (0) and exit (5):

printf '%s\n' 6 0 5 | dbrecover --tui --plain db1/ibd_test_comprehensive.ibd
DBRecover for MySQL Version 2611
English | Log: log_dbrecover.txt
  Plain mode: this session has no interactive terminal. Menus are numbered:
  type the number, then Enter.

Reading ibd_test_comprehensive.ibd ...
+ Reading ibd_test_comprehensive.ibd (00:00)
* db1.ibd_test_comprehensive
  `-  /data/recovery/db1/ibd_test_comprehensive.ibd

db1.ibd_test_comprehensive
Tab or action
   1) Data  - table data (rows) | Rows: 1,000, Include deleted: off
   2) Columns  - column definitions
   3) DDL  - table DDL (CREATE TABLE)
   4) SDI  - the JSON MySQL 8 stores in the tablespace
   5) Info  - file and recovery metadata
   6) Count Rows  - live and deleted
   7) Export DDL...  - save the CREATE TABLE statement
   8) Export Data...  - SQL file with structure and rows, ready to import
   9) Export CSV...  - CSV with a header line
  10) Rows / Include deleted  - change the Data options, then reload
  11) Associate .frm File (MySQL 5.x)...  - for a MySQL 5.x / MariaDB file without SDI
  12) Associate DDL (CREATE TABLE)...  - a file that holds the CREATE TABLE statement
  13) Close
   0) Back
Enter a number [1]: Counting rows of db1.ibd_test_comprehensive ...
+ Counting rows of db1.ibd_test_comprehensive - 100 rows (00:00)
* Row Count
  `-  Table: db1.ibd_test_comprehensive
      Rows: 100
      Deleted rows: 7
  Enable "Include deleted" to look at the deleted records that can still be
  read.
...
Enter a number [1]:   Bye. Exported files stay where you put them; the log is log_dbrecover.txt.