Data Restore¶
Restore work-buddy's vital SQLite DBs from a snapshot. Validates the manifest (refuses if the snapshot's commit or schema is newer than the running code), unpacks to staging, runs migrations forward, verifies integrity, then atomically swaps into place (the old DBs are moved to .data/db.pre_restore_
/ for safety).
Skill name: data_restore
Category: backups
Mutates state (retry policy: manual)
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
force |
bool |
No | Override safety checks (newer-schema, newer-commit). Use sparingly — these checks exist to prevent silent corruption. |
from_remote |
bool |
No | If True, download the tarball from GitHub Releases first (via gh release download). Default False (local-only). |
snapshot_id |
str |
Yes | Snapshot ID (e.g. 'snap-2026-05-11T14-23-00Z') or, if from_remote=True, a GitHub release tag. |
Details¶
The installed-authority ledger is restored without rewriting its irreversible
domain rows. Because those rows bind absolute database-path hashes, a restore
to a different machine or data root deliberately leaves the affected native
stores fail closed. Inspect the central Source Foundation restore status, then
run source_foundation_restore_operator with
rebind_installed_authority=true under its exact high-consent approval. That
operator proves every sealed cohort at its configured target path and archives
a content-free rebind receipt with the restore fence; ordinary data_restore
never silently relocates authority.