Self-hosting
Backup & data
eli.ai keeps state in two places: Postgres (the authoritative store for everything with no file form — entities, relations, runs, evals, traces — plus the derived content index) and the vault on disk (the source of truth for document content and attachments). A complete backup covers both. This page is the durability and retention contract.
"Backup = copy the files" corrupts a live database
Postgres
- Supabase.Supabase supplies managed, point-in-time backups — it replaces the need for a self-run database dump sidecar. Confirm the retention tier meets your engagement's requirements.
- Self-run Postgres. Take a consistent logical dump on a schedule and ship it off-box encrypted (e.g.
pg_dump -Fcpiped to an encrypted store like restic). Delete local dumps after upload, prune old images, and alarm on a disk-usage threshold — disk fill is the identified 2 a.m. page.
The vault (files)
Vault markdown and attachments live under DATA_DIR/vaults/<workspace>/. Managed database backups do not cover these — the vault needs its own file backup. Because the vault is plain markdown, it is also git- and Dropbox-syncable; keep the derived index (which lives outside the vault) out of that sync so the two never fight.
Export tarballs vs. backups
Don't confuse the two. A backup is your operational safety net — it contains everything, including internal cost/margin data. An export is a client deliverable — a .tar.gz of the client-facing KB (vault markdown, the graph as JSONL, golden sets, a manifest) that excludesthe consultant's economics by construction. Never hand a raw backup to a client; use an export. See Export & offboarding.
Deletion & retention
Deletion in eli.ai is designed to be honored, not deferred:
- Soft-deleting a document synchronously hard-deletes its derived rows (chunks, FTS, vectors), so retrieval can never surface deleted content before any nightly job.
- A hard purge cascades through every verbatim-text copy — version snapshots, mention surface text, relation-evidence quotes — and flags affected eval items and traces.
- A workspace delete is a full cascade (content, graph, conversations, gap events, traces, eval history, plus blob removal) that writes a dated destruction record referencing the documented backup-retention window.
Retention window is part of the contract
Restore drill
A backup you have never restored is a hypothesis. Periodically restore a dump into a scratch database and a copy of the vault into a scratch DATA_DIR, point a throwaway instance at them, and confirm documents render and chat cites. See Deployment for standing up an instance.