Own Your Agents · 02.08
Backup & Restore
SQLite online backup with manifest-versioned snapshots — how Agentis protects durable state against loss.
A consistent snapshot while the server keeps running
Backup uses SQLite's online backup API (Database.backup(dest)) rather than a naive file copy — which matters because a raw copy of a live SQLite file can catch it mid-write. The online backup API produces a consistent, checkpointed snapshot even while Agentis is actively serving requests, and the destination file opens cleanly with no dependency on the source's WAL or SHM sidecar files.
What a backup directory contains
| File | Purpose |
|---|---|
data.db | The checkpointed, consistent SQLite snapshot. |
secrets.json | Copied verbatim, with 0o600 permissions re-applied on the destination (best-effort on Windows, which doesn't honor chmod the same way). |
manifest.json | Format version + metadata, so restore refuses to operate on a directory that wasn't actually produced by createBackup, and so future format changes have a version to key off. |
The output is a plain directory, not a compressed archive — a deliberate choice that keeps the CLI dependency-free and makes ad-hoc inspection of a backup trivial (you can just open data.db). Compress it yourself with tar if you want a single artifact to ship somewhere.
Restoring
agentis backup ./my-backup # writes data.db + secrets.json + manifest.json
agentis restore ./my-backup # refuses to overwrite an existing data.db unless --force
Restore refuses to clobber an existing data.db in the target data directory unless explicitly forced — the default path can't silently destroy a running install's state by pointing it at the wrong backup.
Continue
How one Agentis install runs multiple environments, each with its own separate secrets vault.
One universal chat harness backs every channel, so permission modes and turn behavior are identical whether you're on the dashboard, Slack, or WhatsApp.