Overview
PDU provides data recovery methods for various MySQL failure scenarios. Choose the appropriate recovery method based on your situation.
Choose Your Recovery Scenario
Recover from Corrupted Instance
Export data directly from a data-directory copy when the instance cannot start.
Recover from Corrupted Data File
Choose file extraction or surviving-page recovery using IBD and schema evidence.
Recover Single Database Directory
Recover a selected database while preserving required instance-level metadata.
Recover MyISAM Data Files
Extract parseable complete active records from MYD, MYI and matching definitions.
Recover Deleted Records
Recover data from before DELETE using Binlog.
Recover Updated Records
Recover data from before UPDATE using Binlog.
Recover Data from Undo and Redo
Choose a recovery path from surviving page views, Undo history and complete Redo.
Recover a Historical Binlog Snapshot
Reconstruct one table at a specified historical point using a CREATE/TRUNCATE starting point observed in the logs.
Recover Scattered InnoDB Pages
Use DropScan to scan surviving pages and record possible table definitions, object generations and dependencies for large values.
Recover Dropped Tables Without Backup
Scan InnoDB pages in a stable image and extract surviving records after schema binding.
Diagnosis and Native IMPORT Assistance
Diagnose read-only, capture deleted files that remain open and prepare reviewable IMPORT tasks.
Recover Metadata for Other Objects
Handle views, triggers, routines, events and sparse-dictionary object attributes separately.
Recovery Scenario Comparison
| Recovery Scenario | Materials | Output |
|---|---|---|
| Recover from Corrupted Instance | data directory · FRM / SDI | Data SQL and DDL |
| Recover from Corrupted Data File | IBD · DDL | Data SQL |
| Recover Single Database Directory | data directory · metadata | Database data SQL |
| Recover MyISAM Data Files | MYD / MYI · DDL | Complete active records |
| Recover Deleted Records | Binlog · DDL | Recovery SQL |
| Recover Updated Records | Binlog · DDL | Reverse recovery SQL |
| Recover Data from Undo and Redo | base copy · Undo / Redo | Page views and recovery SQL |
| Recover a Historical Binlog Snapshot | ROW Binlog · endpoint DDL | Historical table row set |
| Recover Scattered InnoDB Pages | image · binding | Sparse records and dependencies |
| Recover Dropped Tables Without Backup | image · DDL | Surviving data SQL |
| Diagnosis and Native IMPORT Assistance | IBD · profiles | Diagnosis and operation tasks |
| Recover Metadata for Other Objects | TRG / FRM / DD | Object attributes and definitions |
Quick Start
Configure the data directory and output paths, start PDU and initialize, then select the database and recovery method.
MYSQL_DATADIR=/recovery-input/mysql/data
BINLOG=/recovery-input/mysql/binlog
RESMODE=tx
RESTYPE=deleteparam datadir /recovery-input/mysql/data;
b;
\l;
use appdb;
\dt;