Overview
Choose a PostgreSQL recovery method based on what remains: data files, WAL, table structures or disk pages.
Choose Your Recovery Scenario
Corrupted Instance
Recover data when the PostgreSQL instance cannot start but PGDATA is still accessible.
Corrupted Data File
Extract data from a single corrupted table data file when PostgreSQL reports file corruption errors.
Single Database Directory
Recover data when an entire database directory is corrupted and the PostgreSQL instance cannot start.
Deleted Records
Recover accidentally deleted records from archived WAL or a preserved copy of PGDATA/pg_wal.
Updated Records
Recover pre-update values from archived WAL or a preserved copy of PGDATA/pg_wal.
Dropped Tables
Scan retained disk fragments for data from dropped or truncated tables when no backup is available.
Recovery Scenario Comparison
| Scenario | Required Configuration | Data Source | Recovery Speed |
|---|---|---|---|
| Corrupted Data File | PGDATA | Data file directly | Fast |
| Corrupted Instance | PGDATA | Data file directly | Slower |
| Single Database Directory | Database directory path | Database directory | Medium |
| Deleted Records | PGDATA + ARCHIVE_DEST | WAL archive or checked pg_wal copy | Fast |
| Updated Records | PGDATA + ARCHIVE_DEST | WAL archive or checked pg_wal copy | Fast |
| Dropped Tables | PGDATA + DISK_PATH + PGDATA_EXCLUDE | Disk fragment scanning | Slower |
Quick Start
All recovery operations share a common initialization process. Here's the basic workflow:
1. Configure pdu.ini
If ARCHIVE_DEST points to a copied pg_wal directory, run ckwal; after b; and before any scan or restore command.
2. Start PDU and Initialize
3. Choose Recovery Method
After initialization, select the appropriate recovery guide from the sidebar based on your scenario.
File Identification and Page-Image Recovery
Use Probe when relation files survive with unknown mappings. Use RecoverISO when only a page image and table definitions remain. Follow the corresponding chapter for disk fragments and historical layouts.
Identify Unknown Data Files
Use Probe and ProbeBatch to identify candidate table definitions, then export with confirmed mappings.
Recover Data from a Page Image
Use PDUPlan and RecoverISO to recover data from a PDU page image.
Recover Data from Disk Fragments
Preserve surviving pages and distinguish file identification, image recovery, historical layouts and attribution evidence.