.piabk archive (tar.gz + AES-256-GCM, optional passphrase) and pushes it
to a remote target. Restore goes through “stage, then swap in on restart” —
it only takes effect after validation passes.
What gets backed up
Always (core assets):state.db— settings, session index, encrypted credentials, usage stats;sessions/*.jsonl— every conversation transcript.
- task-workspace, library, personal config (
~/.kova/identity/memory/MCP/ approvals + pet/site permissions/appearance themes); - skills and plugins;
- checkpoints.
Targets
Progress is reported per stage (pack → encrypt → upload). Every archive
carries a payload SHA256, verified per file before restore.
Restore: stage, then swap in
Restore never hot-swaps in place — half-applied restores are the dangerous kind:- Pick a
.piabk(or pull one from the remote target) → unpack to a staging directory; - Verify per-file hashes, trim dangling JSONL lines;
- Validated → mark “pending restore” → atomically swapped in on app restart;
- Only partitions actually present in the archive are swapped in — restoring an older archive onto a newer version never deletes newer data.
Database consistency
Before packing, the backup runs a WAL checkpoint +VACUUM INTO snapshot —
you back up a consistent state, not a half-written database file.