Recover Metadata Relationships and Log Prefixes
When Turtle, metadata or collection relationships are damaged but parts of the catalog, collection files and original WT logs survive, use PDU to read independent source evidence. The following sections describe relationship salvage and log-prefix processing in detail.
I. Initialization
MONGODBDATA=/recovery-input/mongodb/source/dbpathparam sourceversion 8.0.0;
param sourcekind copy;
param sourcefrozen true;Use a new launch directory for metadata salvage, retaining original sources and existing tasks.
II. Read Independent Metadata Relationships
param catalogsalvage true;
ds recovery idx;
ds recovery candidates;
ds recovery unload appdb.orders;Matching ns/ident/UUID and a unique WT file definition can establish independent_relation. Missing WT metadata or catalog still permits independent physical-document candidates with unknown attribution. Relationship evidence is not Turtle-root reconstruction or proof of complete incident-time business state.
III. Process Original WT Logs
param recoveryat none;
param recoverytime none;
param journalcompressor snappy;
ds journal idx;
ds journal status;
ds journal replay appdb.orders;Clear target time first and match the codec to the original logs. Use original metadata file IDs, object generations, checkpoint LSN and continuous prev-LSN chains to select a complete commit prefix and build a read-only overlay. This procedure does not start mongod, run repair, modify sources or import into a target database.
IV. Handle Missing Dependencies
Do not apply damaged commits, and stop when sequence continuity cannot be proved. row_modify requires a complete original base and explicit ABI. Retain limits for range truncate, encrypted logs, missing dictionaries and unknown operations. Record same-name/different-UUID, same-UUID/multiple-name and generation conflicts separately without filename-based guesses.
Output Files
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.