Integrity & trust
Overview
When a backup finishes, T3Vault seals it with BackupIntegrityService:
- Hash artefacts (
*.zipincl.database., legacyzip database./sql. gz database.,sql MANIFEST.) with SHA-256.json - Write
integrity.(algorithm,json createdAt, file digests). - Optionally write
integrity.(HMAC-SHA256 bound to the sitejson. hmac secret). - Submit the digest of
integrity.to OpenTimestamps calendars and store the proof asjson integrity..json. ots - Write
integrity-(stamp outcome metadata — not a trust anchor).meta. json
Trust model:
- Changing backup files without a new seal breaks the hash check.
- Forging a new seal requires a new OpenTimestamps proof.
- Final time-stamp time comes from the Bitcoin blockchain, not this server.
- A large gap between
createdAtand that blockchain time is treated as suspicious (T3Vault allows up to 72 hours for calendar → chain confirmation). - Until the proof is fully attested, status stays
pending. - HMAC is only checked when the site secret is available; on foreign hosts it is skipped so cross-system restore still works.
How to verify a backup (recommended)
The goal is to detect whether the backup was modified after sealing.
Recommended: re-hash artefacts against integrity. with the
bundled verifier (no Bitcoin node required):
php t3vault-verify.phar /path/to/backup_YYYYMMDD_HHMMSS_<id>
Exit code 0 / state ok (or pending with matching hashes) means the
listed files still match the seal. State tampered means do not restore.
Optional: confirm the seal via Manual verification with the OpenTimestamps client — either in the
browser on opentimestamps.org or with the
ots CLI. The hash check above already answers the “was it changed?”
question for the archive files.
You can also verify from the T3Vault UI (Integrity / verify action).
Always keep integrity. and integrity. together in
the backup directory.
Verification states
| State | Meaning |
|---|---|
ok | Hashes match and OTS proof is attested within the time window |
pending | Hashes OK; calendar proof not yet upgraded to Bitcoin |
missing | Integrity files incomplete |
stamp_failed | Stamping failed earlier; hashes may still be OK |
tampered | Hash or OTS digest mismatch / attestation skew |
checking | Transient UI state while a check runs |