Expand description
VTA backup export and import operations.
Export: reads all keyspaces + seed, assembles a BackupPayload, encrypts
with Argon2id + AES-256-GCM, and wraps in a BackupEnvelope.
Import: decrypts the envelope, validates the payload, optionally previews, then replaces all keyspace data and updates the seed store.
§Sub-modules
descriptors— the 3-phase descriptor-pattern op layer for the trust-task slice. Wraps the inlineexport_backup/preview_import/apply_importfunctions below, decoupling bulk byte transport from the JSON envelope. Seedocs/05-design-notes/backup-descriptor-pattern.md.
Modules§
- blob
- Op-layer for the backup-blob byte transport (
GET/POST /backup/blob/{id}). - descriptors
- Op-layer for the backup-descriptor pattern (
spec/vta/backup/*).
Constants§
- IMPORT_
IN_ PROGRESS_ KEY - Key under which
apply_importrecords that a destructive import is in flight. Written (and persisted) before the keyspaces are cleared and removed only after every record is back; if a crash interrupts the import, this survives and boot refuses to start on the resulting hybrid state (seevta-service’sserver::run). Lives in the keys keyspace under a prefix no clear/scan touches.
Functions§
- apply_
import - Apply an import: clears all keyspaces and writes the backup data.
- decrypt_
backup - Decrypt a backup envelope and return the payload.
- export_
backup - Assemble and encrypt a backup of the entire VTA state.
- preview_
import - Decrypt and validate a backup, returning a preview without modifying state.