Only a Disk Image Survives and Collection Files Are Missing?
Scan Isolated Complete Blocks in an Image
Scenario Description
A collection was dropped or files were deleted, with no usable catalogs or extent mappings. Only a disk image remains. It may contain isolated complete WiredTiger blocks that can be scanned within declared ranges to retain parseable inline-document candidates.
Possible Causes
- Catalog relationships were lost after DROP.
- Collection files were deleted and complete mappings cannot be recovered.
- Unoverwritten complete blocks remain on disk.
Challenges
Conventional recovery often requires complete files, a running instance or a usable backup. In these situations, choose a method based on the evidence that survives.
Common Errors and Symptoms
- - Only a stable image survives, without original file origins.
- - Scans find blocks, but business collection names are unknown.
- - Overflow, catalogs or historical dependencies are incomplete.
Why Traditional Methods Fail
- - Normal directory recovery cannot bind isolated blocks.
- - The same physical document may appear repeatedly.
- - External values cannot be addressed without a file origin.
PDU Solution
Specify the start offset, end position and scan step. PDU scans the image, extracts inline records from completely parseable blocks and saves their positions. Plaintext that cannot be parsed as a complete block can be handled in a separate deep-fragment task. Unknown collection ownership and missing dependencies are recorded separately.
Recovery Principle
- Preserve Disk Image
- Configure Scan Range
- Find Complete Blocks
- Export Physical Candidates
PDU Core Capabilities
- The original collection file need not survive.
- Scan an image within explicit ranges.
- Retain parseable inline records and locations.
- Do not invent unknown business attribution.
- Retain physical duplicates without automatic deduplication.
- Choose deep-fragment recovery separately for damaged-block evidence.
Recovery Steps
- 1
Freeze the Image Source Immediately
Use the corresponding command example below, replacing paths, objects and identity parameters with evidence from this run.
- 2
Configure Scan Ranges
Offsets, end positions and steps are examples; set them from actual sources. Scan ranges have inclusive starts and exclusive ends. Without a file origin, overflow address mappings cannot be resolved.
- 3
Scan and Export Complete-Block Candidates
Retain complete parseable inline records and locations without automatically removing physical duplicates or inferring collection names from filenames or _id. Missing dependencies retain partial-source states.
- 4
Handle Sources That Cannot Be Parsed as Complete Blocks
If block headers or cell boundaries are damaged but plaintext BSON remains, use deep-fragment recovery in a separate task. Recognizable compressed fragments can be decoded within bounds with readable prefixes retained. Undecoded damaged tails, missing dictionaries, ciphertext and overwritten bytes retain their failure reasons.
Quick Command Examples
Preserve frozen sources and launch PDU outside them. Write configuration snippets to pdu.ini and execute PDU commands after startup. Replace example paths, versions, times and task identities with actual evidence.
# Configure Scan Ranges
MONGODBDATA=
EXTENT_MAP=
DISK_PATH=/recovery-input/mongodb/source/image-source
SOURCE_VERSION=8.0.0
SOURCE_KIND=imagecopy
SOURCE_FROZEN=true
RESMODE=all
EXMODE=bson
DSOFF=193
SCAN_END=24512
SCAN_STEP=512# Scan and Export Complete-Block Candidates
ds idx;
ds idx status;
ds unload all;
ds log;Export Results
Recovered Documents
BSON or the selected data format at paths reported by the program.
Sources and Attribution
Retain namespace/UUID, source positions and candidate states; unresolved attribution stays unknown.
Tasks and Dependencies
The launch directory retains native tasks, checkpoints and original reasons for missing pages or overflow.
After export, record PDU’s native success and failure counts and original errors, retaining checkpoints. Resume uses native records and file metadata without rereading exported data or automatic trial import.
Prerequisites
- This documentation applies to Linux and source versions MongoDB 6.0.0, 7.0.0 and 8.0.0. Freeze source copies and launch PDU from a directory outside the sources. State and output use the launch directory without separate path settings. Confirm other versions and special layouts separately.
- Use a stable imagecopy, confirmed version and scan boundaries, with empty MONGODBDATA and EXTENT_MAP.
- Prepare a matching program, license and sufficient space. Keep original evidence read-only and place the PDU launch directory outside the sources.
Important Notes
- Results are physical candidates within the range rather than a complete collection.
- Do not guess overflow addresses without origins or mappings.
- Set offsets, ends and steps from the actual image rather than copying examples.