Protect the Recovery Scene
When a database incident occurs, protect the recovery scene before choosing a recovery method. The following sections describe the materials to preserve for startup failures, accidental DELETE/UPDATE and dropped collections.
Scenario 1: The Database Cannot Start or Data Files Are Damaged
- Copy WiredTiger, WiredTiger.turtle, WiredTiger.wt, _mdb_catalog.wt and collection files.
- Preserve WiredTigerHS.wt, journal, indexes, compression and encryption dependencies.
- Use a consistent frozen copy with separate source, task-state and output directories.
Scenario 2: Accidental DELETE or UPDATE
Preserve existing history store, pre-images and oplog promptly. Record the target database, collection, UUID, operation range and time information.
Historical Sources Are Available
Preserve directory metadata and related collection files from the same source chain. Complete historical parsing depends on base values, version chains and transaction evidence. Logs alone do not prove that complete old documents remain.
Complete Historical Sources Are Not Available
Continue preserving current collection files and available block sources. Reclaimed data with no other old image cannot be recreated, and enabling future pre-images cannot restore history already lost.
Scenario 3: One or More Collections Were Dropped
1. Identify the Data Directory and Its Disk Device
Record dbPath, disk devices and source ranges from configuration and mounts. Preserve pre-drop collection identity, directory metadata and historical sources. This section covers collection DROP and requires pre-drop collection relationships and available sources.
2. Prepare PDU on Another Disk
Use frozen source copies and launch PDU from a directory outside the sources. State and output use launch cwd. Do not scan a production disk that is still being written.
3. Configure the Scan Source
Use the directory path when a complete directory map exists. Preserve a declared extent manifest when only file-range mappings exist. An unmapped image requires explicit scan boundaries and source version.
4. Scan the Preserved Disk Image
See the detailed procedure for recovering dropped collections without backups.