Recover Plaintext Deep Fragments
When WiredTiger headers, descriptor blocks or cell boundaries are damaged but interpretable plaintext survives, use PDU deep-fragment scanning. The following sections describe extraction of complete documents, field fragments and suspected structures.
I. Initialization
DISK_PATH=/recovery-input/mongodb/source/collection-source.wt
SOURCE_VERSION=8.0.0
SOURCE_KIND=copy
SOURCE_FROZEN=true
RESMODE=all
EXMODE=bsonDeep scanning searches byte windows independently of SCAN_STEP alignment for complete blocks. Retain declared holes for mapped sources; complete documents spanning readable logical extents can use the mapping.
II. Build a Fragment Index
ds fragments idx;
ds fragments status;Indexes retain source positions, lengths, classifications and field descriptions without caching customer document bodies. Record completeness, collection attribution and business time separately.
III. Export Complete-Document Candidates
ds fragments unload documents;Complete BSON with a unique interpretable _id enters complete_document_candidate. Output retains original BSON or Canonical Extended JSON without proving original collection, commit state or pre-incident time.
IV. Export Field Fragments and Suspected Structures
ds fragments unload fields;
ds fragments unload structures;| Classification | Meaning |
|---|---|
| field_fragment | Independently interpretable scalar fields with unknown container boundaries and original record relationships. |
| structure_suspect | Complete BSON structures that do not meet complete-document candidate criteria. |
Both outputs explicitly mark recovered_document=false and include raw fragments and source coordinates. Selections use separate tasks/output without assembling fields, guessing missing values or writing to a target database.
V. Handle Unrecoverable Content
VI. Continue the Recovery Task
Continue with the original task and selection. If an unfinished partial output remains ACTIVE, the engineer must decide how to handle it; PDU does not read or delete it automatically. Multi-source tasks use the corresponding case resolve.
ds fragments resolve discard-active documents;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
Count complete-document candidates, field fragments and suspected structures separately. fields/structures are evidence and are not recovered business documents.