Recover Data from Mapped Fragments
When original files are deleted or incomplete but the engineer has trusted extent mappings, use PDU to read logical files from actual block sources. The following sections describe single-file and directory mappings in detail.
I. Prepare Sources and Extent Manifests
Preserve a stable image and an extent manifest in project format. Ranges record logical file positions and actual source positions. Declare missing ranges explicitly without inferring sources from filenames or document _id.
II. Recover a Single Logical File
DISK_PATH=/recovery-input/mongodb/source/image-source
EXTENT_MAP=/recovery-input/mongodb/source/collection-extents.json
SOURCE_VERSION=8.0.0
SOURCE_KIND=imagecopy
SOURCE_FROZEN=true
RESMODE=all
EXMODE=bsonds idx;
ds idx status;
ds unload all;Known logical positions permit reading pages and large-document dependencies across physical fragments. Collection identity and generation still require independent evidence and are not established by mapping completion.
III. Recover Missing Directory Sources
MONGODBDATA=/recovery-input/mongodb/source/dbpath
DIRECTORY_EXTENTS=/recovery-input/mongodb/source/directory-extents.jsonb;
ds catalog status;
use appdb;
unload db appdb;DIRECTORY_EXTENTS supplements collections, HS and metadata bound by matching catalogs. Preserve readable WiredTiger.turtle. Automatic recovery of a missing turtle is not integrated, so scattered collection files alone do not establish complete directory recovery.
IV. Handle Missing Ranges
Missing ranges return EXTENT_SOURCE_PARTIAL. Retain complete parseable documents first and errors for records dependent on missing ranges. Do not zero-fill, guess overflow addresses or assemble missing-page records into complete documents.
V. Continue the Recovery Task
If source files and mappings are unchanged, resume using recorded ranges and file metadata. Register a new source identity for added or replaced files. Keep old tasks and output without modifying existing export results.
Retain native success, failure, unresolved dependencies, original errors and checkpoints. Completed-run resume reads native records and file metadata without checking exported content for counts, JSON, UTF-8, hashes, redecoding or trial import.
Output Files
Output retains actual source coordinates, mappings, candidates and missing dependencies. Directory mode also records namespace/UUID; single-file mapping does not automatically establish business attribution.