Can An Ollama Model Digest Prove An Offline Backup Is Complete?
An Ollama model digest proves manifest identity, not backup completeness. Learn the file-hash and denied-egress restore test that provides stronger evidence.
No. An Ollama model digest is useful evidence, but it cannot prove that an offline backup is complete. The digest returned by /api/tags identifies the model manifest Ollama currently reads. A recoverable backup must also contain every referenced blob, the correct manifest path and tag, a compatible Ollama runtime, required configuration and permissions, and enough evidence to reproduce the service without downloading anything.
The decisive test is a restore on a clean target while public network egress is denied. If the model loads and answers a controlled prompt without a pull, the backup has passed a recovery test. If you only compare the digest shown by ollama list, you have checked identity—not recoverability.
Research cutoff: September 5, 2026 (America/Chicago). Ollama's storage layout and APIs can change; confirm the current documentation and test the exact version you operate.
The Short Answer
Treat an Ollama digest as one field in a recovery record, not as a backup certificate.
Ollama's current list-models API returns, for each locally available model, a name, modified time, size, digest, format, family, parameter size, and quantization level. That inventory is valuable. It can show that a restored tag resolves to the same manifest content as the source system.
But a matching digest does not answer all of these questions:
- Is the corresponding manifest file actually present in the backup?
- Are every configuration and model layer referenced by that manifest present?
- Did the copy preserve all shared blobs used by other tags?
- Is the backup readable by the account that runs Ollama?
- Is the destination using the same
OLLAMA_MODELSpath? - Is a compatible Ollama binary or container image available offline?
- Can the model load on the destination hardware without reaching the internet?
The evidence chain should therefore be digest plus file hashes plus configuration plus a denied-egress restore test.
What Is Confirmed
Ollama documents GET /api/tags as the endpoint for listing locally available models. Its example response includes a 64-character hexadecimal digest alongside each model's name and size.
The current Ollama source makes the meaning more specific. In manifest/manifest.go, ParseNamedManifest opens the manifest file, decodes it, computes SHA-256 over the bytes it read, and stores that hexadecimal result as the manifest digest. The server exposes that value in its model-list response.
The same source shows why one digest is not a complete file inventory. A parsed manifest contains a configuration layer and a list of other layers. Those layers have their own content digests and reside in Ollama's blob store. Ollama's HEAD /api/blobs/:digest endpoint checks whether one named blob exists on the running server; it does not attest to an entire backup archive.
Ollama's FAQ also documents that model storage is a directory, with default locations that vary by operating system and an OLLAMA_MODELS setting that can redirect the service elsewhere. A correct copy placed in the wrong directory can therefore fail even though its bytes are intact.
Finally, NIST SP 1339 says effective backup management includes creating backups regularly, integrating them into change management, testing them, and reviewing them during recovery exercises. CISA's StopRansomware Guide likewise recommends regularly testing backup availability, integrity, and restoration procedures. Neither source treats a single identifier as proof of recoverability.
What Is Still Unclear
Ollama does not currently publish one universal backup attestation format covering every operating system, container layout, storage engine, model type, custom tag, adapter, or future runtime release.
It also does not document a first-class command that produces a signed statement such as “this archive contains everything required to restore these tags.” Open feature requests and support discussions show that per-model export and offline migration remain version- and model-type-sensitive.
A matching source and destination digest still cannot establish:
- that unused but operationally required models were not omitted from the intended backup scope;
- that a front end's chat database, retrieval index, uploads, or settings were preserved;
- that the Ollama executable, GPU libraries, drivers, and container image are compatible;
- that file permissions, ownership, service variables, and firewall rules match the intended design; or
- that a future restore will succeed after hardware, operating-system, or runtime changes.
That uncertainty is why the recovery test matters more than the label on the media.
What Does The Ollama Digest Actually Prove?
On the source machine, a digest from /api/tags proves that Ollama successfully read a manifest for that local model entry and calculated the reported value from the manifest content.
After restoration, the same digest can provide strong evidence that the restored tag resolves to byte-identical manifest content. That is valuable for detecting a changed template, system instruction, parameter layer, model layer reference, or other manifest change.
It does not recursively hash the backup directory. The manifest points to other content-addressed objects. The top-level digest does not replace checking that every referenced object is present and uncorrupted.
Think of it like the checksum of a packing list. If the packing list matches but one numbered crate is missing, the shipment is still incomplete.
Why ollama list Can Pass Before A Restore Fails
ollama list and /api/tags enumerate model manifests. That makes them good inventory tools, but a model can appear in the list even when a required blob cannot be opened later.
A restore can fail after a successful listing because:
- a large weight blob was skipped or truncated;
- a smaller template, parameter, license, adapter, or configuration layer is missing;
- the service is reading a different models directory than the one you restored;
- the files belong to the wrong operating-system account;
- the restored runtime cannot use that model format or hardware path; or
- the destination silently reaches a registry and replaces missing content with a pull.
The last failure is especially misleading. A test performed with internet access may look successful even though the backup was incomplete. The network repaired the evidence before you inspected it.
Use The RESTORE Evidence Chain
Use RESTORE to separate model identity from recovery proof.
R — Record The Runtime And Inventory
Before copying, record the exact runtime version and the complete model list.
ollama --version
curl http://127.0.0.1:11434/api/version
curl http://127.0.0.1:11434/api/tags
Keep the raw JSON, not only a screenshot. The version endpoint and /api/tags output can be compared mechanically after restoration.
For critical tags, also save the response from Ollama's show-model API. It supplies additional evidence about templates, parameters, capabilities, license text, and model metadata.
E — Establish The Real Models Directory
Confirm the directory used by the running service. Ollama's documented defaults are:
- macOS:
~/.ollama/models - Linux standard installation:
/usr/share/ollama/.ollama/models - Windows:
C:\Users\%username%\.ollama\models
Those defaults do not override a configured OLLAMA_MODELS value, a container volume, a service-manager setting, or a deployment wrapper. Record the resolved path and the service account that reads it.
S — Stop Writes Or Take A Consistent Snapshot
Stop Ollama before a normal filesystem copy. Do not copy while a model is being pulled, created, copied, or deleted.
If downtime is unavailable, use a storage snapshot that guarantees a consistent point in time. A copy assembled from files changing at different moments may have valid individual hashes and still represent no coherent model store.
T — Take A File-Level SHA-256 Inventory
Hash every regular file in the backup scope, including manifests and blobs. Store relative path, byte length, and SHA-256 outside the directory being hashed.
On PowerShell, one practical pattern is:
$modelRoot = 'D:\OllamaBackup\models'
Get-ChildItem -LiteralPath $modelRoot -File -Recurse |
Sort-Object FullName |
ForEach-Object {
$hash = Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256
[pscustomobject]@{
Path = [IO.Path]::GetRelativePath($modelRoot, $_.FullName)
Bytes = $_.Length
SHA256 = $hash.Hash.ToLowerInvariant()
}
} | Export-Csv -NoTypeInformation -Encoding UTF8 'D:\OllamaBackup\models-sha256.csv'
On Linux or macOS, run the equivalent with find, a stable sort, and sha256sum or shasum -a 256. Preserve the command and locale with the results so the procedure is reproducible.
Do not hash only the largest blob. Ollama manifests can reference multiple layers, and content may be shared among tags.
O — Obtain The Offline Recovery Dependencies
Keep the approved Ollama installer, package, or container image with its own checksum and source record. Preserve service configuration, the intended OLLAMA_MODELS setting, ownership and permission requirements, firewall policy, and any model-specific customization.
Back up connected applications separately. The Ollama models directory is not a universal archive for Open WebUI chats, application databases, vector indexes, uploaded documents, API gateway configuration, or user accounts.
R — Restore To A Clean Target And Recalculate
Restore the files to a clean test host or isolated recovery environment. Apply the recorded ownership and permissions. Start the recorded Ollama version and request /api/version, /api/tags, and /api/show again.
Compare:
| Evidence | What A Match Supports | What It Does Not Prove |
|---|---|---|
| Model name and tag | Intended inventory is visible | Referenced blobs can load |
/api/tags digest |
Manifest content matches | Whole backup directory matches |
| Reported model size | Expected logical size is plausible | Every file copied without corruption |
| File-level SHA-256 list | Copied files match the recorded backup | Runtime and hardware compatibility |
| Ollama version | Intended runtime is installed | Configuration and permissions are correct |
| Successful denied-egress inference | Required local path worked in this recovery test | Every future prompt, model, or hardware path will work |
E — Execute A Denied-Egress Inference Test
Block public outbound access using a control independent of Ollama: a disconnected test network, deny-by-default firewall, isolated virtual network, or equivalent enforced boundary. Monitor logs and network attempts.
Then load every critical model and run a short, deterministic prompt. For multimodal, embedding, or tool-oriented models, test the capability your recovery plan actually depends on rather than only plain text generation.
A passing test should show:
- the expected tag and digest are present;
- file hashes match the backup record;
- Ollama loads the model without a pull;
- the required inference path completes; and
- no public network route was available to hide missing content.
Record the date, target, runtime, model digest, test input, outcome, and network-control evidence. Repeat the exercise after material runtime, storage, model, operating-system, or hardware changes.
Should You Verify Every Blob Referenced By A Manifest?
For a selective per-model backup, yes. Parse the selected manifest, enumerate its configuration and layer digests, confirm each corresponding blob exists, then verify each blob's SHA-256 against its content-addressed name.
For a whole-directory backup, a complete file-level inventory is usually simpler and less error-prone. It captures shared layers without requiring you to reconstruct reference relationships for every tag.
Ollama's blob-check API can confirm one object on a running server, but thousands of successful HEAD requests would still describe the live server—not necessarily the removable disk, archive, replica, or object-store snapshot you intend to recover from. Hash the actual backup artifact.
What If The Digest Changes After Restore?
Stop and investigate. A digest mismatch means the restored manifest content is not byte-identical to the recorded source manifest.
Possible causes include:
- a different model tag or namespace;
- a model recreated from a Modelfile;
- a changed template, system prompt, parameter, adapter, or layer reference;
- normalization or migration by another runtime version; or
- corruption or replacement of the manifest.
Do not automatically declare compromise. First compare the raw source and restored manifests, runtime versions, resolved model paths, and creation history. But do not waive the mismatch merely because the model produces plausible answers.
Where OpenVeil Fits
OpenVeil is a hosted, privacy-focused AI workspace for adults who want browser-local normal chat history and no normal server-side chat-history record. OpenVeil does not use prompts, files, images, audio, selected history, or outputs to train a foundation model.
That is a different operational choice from running Ollama. OpenVeil removes the need to store, hash, transport, and restore local model weights, but active requests still require processing by OpenVeil and necessary providers. OpenVeil is not fully offline, anonymous, zero-log, HIPAA compliant, an Ollama host, a backup validator, an egress-control product, or protection for a compromised device.
If policy requires inference to stay on controlled hardware with no public network path, build and test the local recovery chain. If the bigger problem is the labor of maintaining local models and backup media, you can try OpenVeil within its documented hosted-service boundaries.
For the broader procedure, read how to back up Ollama models for an air-gapped restore. Then use the Ollama local-only verification guide to test the network boundary.
Frequently Asked Questions
Is The Ollama Model Digest A SHA-256 Hash?
Ollama's current source calculates SHA-256 over the manifest bytes and returns the hexadecimal result in the model record. It is a hash of the manifest content, not one recursive SHA-256 over the complete models directory.
Can Two Tags Have The Same Digest?
Yes, if they resolve to byte-identical manifest content. Tags are names; the digest identifies content. Your backup inventory should preserve both because operators and applications usually request models by name and tag.
Does A Matching Digest Mean The Model Weights Match?
It means the manifest points to the same layer digests. You still need to establish that the referenced blobs exist and their bytes match those content digests on the actual backup and restored target.
Is Copying The Entire Ollama Models Directory Enough?
It is the safest general content-copy strategy, but “copied” is not the same as “recoverable.” Add file hashes, runtime and configuration evidence, permissions, a clean restore, and a denied-egress inference test.
Can I Test The Backup With Internet Access Enabled?
You can perform preliminary checks, but the decisive recovery test should deny public egress. Otherwise Ollama may pull missing content and make an incomplete backup appear healthy.
Does The Models Directory Include My Chat History?
Not necessarily. A separate front end or application may store conversations, users, settings, uploads, and retrieval indexes elsewhere. Inventory every component in the service, not only Ollama's model store.
How Often Should I Repeat The Restore Test?
Use a schedule proportional to the system's importance and repeat after material changes to Ollama, models, storage, hardware, drivers, service configuration, or network policy. A backup proven last year is not automatically proven for today's stack.
Bottom Line
An Ollama model digest proves manifest identity. It does not prove backup completeness.
The defensible recovery chain is: record /api/tags, /api/show, and the runtime version; identify the real models directory; stop writes or take a consistent snapshot; hash every backup file; preserve the runtime and configuration; restore to a clean target; and run the required model with public egress denied.
That last step turns a collection of plausible files into tested recovery evidence. If the model only works after the network is re-enabled, the backup did not pass.
Sources
- Ollama API: list local models and manifest digests
- Ollama source: manifest parsing and SHA-256 digest calculation
- Ollama API source documentation: blob existence, model list, and model details
- Ollama FAQ: default model locations and
OLLAMA_MODELS - Ollama API: show model details
- Ollama API: get runtime version
- Ollama issue #15484: model-type-sensitive offline backup and restore question
- NIST SP 1339: OT Backup Quick Start Guide
- CISA StopRansomware Guide: backup integrity and restoration testing