Problem
HAPI has accumulated weeks of session state (~78 sessions, the entire dogfood/peer-handoff history, operator manifest, voice config). A single bad migration or disk failure wipes all of it. Currently no backups.
Proposal
Handoff: server-setup agent at session 8b052d61 owns backup infrastructure. This issue specifies what to back up and the cadence.
What needs backing up (operator-only knowledge):
| Path |
Purpose |
Frequency |
Sensitivity |
~/.hapi/hapi.db |
Primary SQLite store (sessions, messages, runners, fcm_devices) |
twice daily |
high (private messages) |
~/.hapi/hapi.db-wal + -shm |
WAL companions -- need them consistent |
with hapi.db |
high |
~/.hapi/hub.env |
API keys (DASHSCOPE, GEMINI, ELEVENLABS, JWT secret, access token) |
twice daily |
secrets |
~/.config/hapi/driver-manifest.yaml |
Operator soup manifest (which feature layers ship in the daily) |
twice daily |
low |
~/.hapi/driver-status.json |
Driver-stack coordination state |
twice daily |
low |
~/coding/hapi/docs/plans/*.md (untracked) |
Operator-local plans and peer handoffs |
twice daily |
medium |
~/voice-test-output/ |
Voice harness artefacts (WAVs + results.json) |
weekly |
low |
Method:
- Use SQLite online backup API (
.backup command or VACUUM INTO) for hapi.db -- copying the file directly while WAL is active risks corruption.
- Encrypt
hub.env at rest (it contains live API keys).
- Backups should land somewhere off-box -- ideally the operator's Proxmox or a Tailscale-attached storage host.
Cadence: twice daily for now (06:00 and 18:00 local).
Acceptance
Handoff
- Server-setup agent: session
8b052d61
- Operator-knowledge owner: this hub operator
Problem
HAPI has accumulated weeks of session state (~78 sessions, the entire dogfood/peer-handoff history, operator manifest, voice config). A single bad migration or disk failure wipes all of it. Currently no backups.
Proposal
Handoff: server-setup agent at session
8b052d61owns backup infrastructure. This issue specifies what to back up and the cadence.What needs backing up (operator-only knowledge):
~/.hapi/hapi.db~/.hapi/hapi.db-wal+-shm~/.hapi/hub.env~/.config/hapi/driver-manifest.yaml~/.hapi/driver-status.json~/coding/hapi/docs/plans/*.md(untracked)~/voice-test-output/Method:
.backupcommand orVACUUM INTO) forhapi.db-- copying the file directly while WAL is active risks corruption.hub.envat rest (it contains live API keys).Cadence: twice daily for now (06:00 and 18:00 local).
Acceptance
hapi.dbto a scratch path, open withsqlite3, check session count matches)hub.envbackups are encrypted (e.g. age, gpg, or vault)Handoff
8b052d61