PST and OST Internal Structure Recovery
PST and OST files are database containers built around a node index and a block index. A structural repair aims for a consistent file and may remove damaged structures together with the items that depend on them, so the local file and its profile context are preserved before any repair, resync, account recreation or deletion — and a cache is recreated only after server and other sources are shown to hold what is needed.
- Copy the PST or OST and note its profile context before any repair, resync, account recreation or deletion.
- Recreate an OST only after the server is shown to hold the needed content and local-only items are preserved.
- The PST specification maps nodes to blocks through two separate trees; a valid tree does not prove items are semantically correct.
- Run ScanPST on a copy and record the version; its
.bakand recovered folders do not replace the untouched original. - A file that opens, or a matching item count, does not show that every message, body and attachment is present.
PST recovery is database-structure recovery
Microsoft’s PST specification, [MS-PST], describes a Node Database (NDB) layer consisting of a header, file allocation information, blocks, nodes, a Node B-tree (NBT) and a Block B-tree (BBT) (NDB layer overview). PST recovery is therefore database-structure recovery, not generic email-file parsing.
The specification’s scope is the PST file format. OST files share much of the design, but that does not mean every OST from every Outlook version is fully described by the same document, or that an arbitrary PST parser reads a given OST correctly; support for the specific file type and version has to be established.
NBT and BBT answer genuinely different questions
The two trees have separate roots, and both are reached from the file header, whose ROOT structure holds a reference to each root page (ROOT). Reaching the data of a top-level node is a two-step lookup:
- NBT: node ID → block IDs. The NBT maps a node ID to the block ID of the node’s data and, where present, the block ID of its subnode structure.
- BBT: block ID → file location. The BBT maps a block ID to the offset and size of the block in the file.
A node existing in the NBT does not guarantee that its block IDs still resolve correctly in the BBT, and damage to either tree, or to the header that points at them, can make otherwise-intact data unreachable. Two further limits matter for recovery. NBT entries carry a parent node ID, but that field is not the whole messaging hierarchy: folder contents, item lists and properties live in higher-layer structures that must also agree. And subnodes have a different scope from top-level nodes — they belong to the node that owns them and are reached through that node’s subnode structure, not looked up directly in the NBT.
Several logical layers sit above the raw NDB
Above the NDB, the PST format defines a Lists, Tables and Properties (LTP) layer — Heap-on-Node, Property Context and Table Context among its structures — and a messaging layer whose objects represent folders, messages and attachments. A message is not one record at a single offset.
Illustrative dependency, not a case report: a message’s node points to a data block holding its property context (subject, sender, flags and other properties), while larger property values and its attachments can be held in subnodes, each resolved through further blocks. If only the block behind one attachment subnode is lost, the message can still open with its headers and body while the attachment is missing; if the block holding a large body value is lost, the headers can survive without the body.
Two consequences follow. A structurally valid tree does not prove semantic correctness: nodes and blocks can resolve cleanly while a property, table row or folder reference is wrong or missing. And a parser that walks nodes directly can find orphaned candidates — items no longer referenced from any folder — but that does not guarantee it finds every deleted message, or that it can tell where in the folder tree an orphan originally belonged.
ScanPST prioritizes structural validity over preserving every message
ScanPST (the Inbox Repair Tool) scans the file it is given and, if the user chooses Repair, applies its fixes to that same file; Microsoft’s repair guidance notes that it first creates a .bak backup in the same folder (Repair Outlook data files). Its goal is a structurally consistent file, not the maximum preservation of every damaged message: where a damaged structure cannot be rebuilt, a repair may remove it, and items that depended on it can disappear or turn up only in a recovered or Lost and Found folder. Not every error it reports leads to deletion, but the outcome cannot be predicted from the error alone.
Run ScanPST on a working copy, never the only one, and keep the untouched original outside the reach of Outlook and any repair tool. The .bak and the recovered folders are useful outputs, not substitutes for that original: the .bak is made by the same run and lives next to the file being changed. Record which operation was run — a scan only, or a repair — the tool and Outlook version, and which copy it was run on.
A repair reported as successful can still rearrange reachability: rebuilt folder structures, items moved into a generated folder, and objects that are no longer referenced. Assessment compares the original, the repaired copy and any server or archive source side by side rather than trusting the repaired copy alone. The general distinction is covered in Repair vs. Recovery.
PST and OST carry very different recovery priority
A PST can be an archive, a POP3 mailbox’s only local store, an exported mailbox, or otherwise the sole copy of its content. An OST is normally a local cache of a mailbox that lives on Exchange, Microsoft 365 or an IMAP server, so the server is often the main recovery source and a PST is more often the primary evidence.
That difference changes what happens after preservation, not whether it happens. Both are copied first, with the context needed to interpret them — file path, account and profile, size and timestamps — before any resync, account or profile recreation, deletion or repair, each of which can change or remove the local file. Comparison with the server and other independent sources — webmail, another synchronized client, an archive or export — comes after, and is not a condition for starting to preserve. If the file sits on storage with read errors or instability, the copy is an acquisition problem: reading the disk ad hoc to build a full mailbox copy can cost more than a controlled acquisition (see How to Image a Failing Drive Safely and Recovery Copies).
“OST is cache” is a workflow default, not a rule without exceptions
In Cached Exchange Mode the OST is a local copy of the mailbox: Outlook works from it while offline, updates it from the server when online, and sends messages drafted offline only after reconnecting (Cached Exchange Mode). Edge cases can therefore make an OST unique: unsynchronized drafts, items that never reached the server, a server mailbox since deleted or purged, an inaccessible account, retention removing older content, or an old workstation holding cached history that exists nowhere else.
The server is authoritative for the service, but that is not the same as being complete for a particular user’s history. It may also be unavailable or changed since the OST was last synchronized. Recreating the cache is reasonable only after the server is shown to hold the content that is needed, for the folders and date ranges that matter, and after any local-only material has been preserved. Microsoft’s guidance that an OST for an Exchange account can be deleted and recreated assumes a working server mailbox; it does not carry over unchanged to every account type or situation.
Truncation is a storage question before it is a B-tree question
A PST or OST that looks shorter than expected is not primarily a B-tree repair problem, even though its symptoms can look similar. The first question is what actually happened: whether the file is genuinely truncated, was only partially acquired, was modified after the incident, or is sparse. A difference between a file’s logical size and the space allocated to it does not by itself prove truncation.
Establishing the expected length, whether reads are stable, the filesystem allocation state and timestamps, and how much of the file the acquisition actually covered belongs before any structural repair, since the storage or filesystem layer may be the real point of failure. Keep whatever file mapping and acquisition-coverage record is available with the copy before any external repair. Opening the file in Outlook, compacting it or letting it resync can each change it, and on the only copy that change cannot be undone.
Validating a local, server or exported mailbox
For a repaired PST, a recreated OST or an export, validation checks the content that matters, not the container:
- Scope. The folders and date ranges that matter are present, compared against the original, the server or an independent export.
- Items. Messages, bodies and attachments are present, and representative items from each important folder actually open, attachments included.
- Identity. Timestamps and message identity make sense: items that look like duplicates, or the same subject under different dates, are checked rather than counted twice or dropped.
A matching item count does not prove the two sets are the same, and a PST that opens in Outlook has not shown that every item in it is intact. Protected or encrypted mail may need the right account, credentials or certificates to read; recovering the container does not by itself make such messages readable in plaintext. The general approach is in How to Validate Recovered Data.
Copy the PST or OST and record its profile context before ScanPST, resync, account recreation or deletion. Then compare it with the server and other sources; recreate an OST cache only once those sources are shown to hold what is needed, and validate whatever result you keep against the original.
Technical references: [MS-PST] 1.3.1.1 Node Database (NDB) Layer — NBT, BBT and the lookup path · [MS-PST] 2.2.2.5 ROOT — references to the NBT and BBT root pages · Microsoft Support: Repair Outlook data files (.pst and .ost) — ScanPST, .bak, OST recreation for Exchange accounts · Microsoft Learn: Cached Exchange Mode — the OST as a local mailbox copy. [MS-PST] specifies the PST format only; OST variants and the behaviour of ScanPST in a particular Outlook version are not fully defined by it.
Related: Outlook PST/OST Corruption · Recovery Copies: Source, Image, Working Copy and Destination · File System Corruption · Repair vs. Recovery · VM, Database and Application-Container Recovery Tools