AUDIO

Listen to this page

0:00
Chapters

    backup — disaster-recovery zip & restore

    The safety net for the whole holai installation: it packs one zip file that carries the complete configuration — the SQLite home database only, which contains everything (users, settings, env variables, plugin selection/lock, config table and every plugin's own state rows), so a fresh instance on new hardware becomes the old home again after a restore. If the box dies, the zip is on Google Drive (default) or FTP/S3.

    The plugin is admin-only (admin scope), everything is managed on the "Backup & restore" plugin page.

    What goes into the zip

    manifest.json          app "holai", kind "backup", createdAt, dbBytes
    db/holai.db            consistent SQLite snapshot (WAL) with ALL state
    files/<plugin>/…       the folders a plugin DECLARES for backup
    

    All of holai's state lives in data/ (see ../architecture); each plugin's state is rows of the central db (ctx.sqlStore), not per-plugin files. That is why a zip plus a fresh install is the complete home: users, logins, voices, plugins, their connected accounts and their settings. On top of that the archive carries every folder a plugin declares as backup.include (e.g. the Obsidian vault — user-edited md files living only on the file system); the "Back up plugin data folders" checkbox on the plugin page (on by default) decides whether they are included. Limits: one file up to 12 MB, 192 MB per backup, larger attachments are skipped. A restore changes exactly the declared folders; plugins without a declaration keep their current files.

    • Media (data/audio, camera clips in their own volume, response speech) is deliberately not included — it is regenerable, not configuration.
    • The zip contains secrets (tokens, API keys of the env store) — store it in the connected cloud only, do not mail it around.

    Schedule & retention

    Periodicity (plugin page, also settable by voice via the agent):

    mode meaning
    change a backup after every settings change — the core db's mtime fingerprint is watched; a 5-minute quiet period collapses bursts of edits into one backup
    daily once a day (default)
    weekly once every 7 days
    off backups only via the "Create backup now" button / the agent tool

    Retains (default 3): the last N backups are kept — both as local zips (data/plugin-data/backup/backups/) and in each cloud destination; older ones are deleted automatically. The page's list is a log of runs (the last 50), not the set of stored zips: rows whose zip was removed by retention stay in it — dimmed, marked "removed by retention", without download/apply — and such a row can be cleared with Delete like any other.

    Storage destinations (Google Drive by default)

    • Google Drive (default, expanded): the same one-button OAuth connect as the other Google plugins — press Connect, consent in the popup, done. Needs GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET in the Env variables screen (and the registered redirect /api/v1/oauth/google/callback — see ../agent-and-language). Uploads go into a Drive folder (name configurable, default holai backups, created when missing). Any number of accounts can be connected; the first one uploads.
    • FTP (collapsed by default): host, port, user, password, optional directory. Plain FTP over TCP (no FTPS), passive mode.
    • S3 (collapsed by default): endpoint, region, bucket, access key, secret key, optional prefix. Works with AWS and any S3-compatible store (MinIO, B2, Scaleway …), signature V4.

    Each backup is uploaded to every configured destination at once (a hardware crash may kill the network too — more than one destination is cheap insurance), plus the local copy on the box.

    Restore

    1. Upload the zip on the plugin page (or drag it in) — the plugin reads the manifest, validates the db and shows a summary: backup timestamp, db size and the plugin list recorded in the manifest.
    2. Apply — behind a confirmation dialog, because applying wipes the current configuration (the confirm text spells this out; typing is not required, the intent question is enough). Before the wipe the plugin automatically creates a safety backup of the current state, so an apply is always reversible.
    3. Restart the core (the page says so) — the SQLite file is swapped on disk and the fresh process loads the restored users/settings. After any docker/core restart the restored home is live (login data comes back from the backup — including the admin password that was valid when the zip was created).
    4. Undo — while a safety copy exists, "Undo last restore" applies the pre-restore state again (with its own confirmation + restart).

    Fresh install without any prior instance: run holai once, log in, enable the backup plugin, upload the zip, confirm, restart. Done.

    Tool actions (POST /api/v1/tools/backup, admin role)

    action what
    status current schedule, retain count, destinations, last backup (when, size, where it went), last restore
    run create a backup now (same as the button)

    The restore has no agent tool on purpose — wiping the home by voice is a UI-only, confirmed operation.

    Troubleshooting

    • The Connect button reports missing credentials → set GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRET (Env variables screen) first.
    • "no storage destination configured" → connect a Drive account (or fill in FTP/S3); local backups are still created without any destination.
    • Restore refuses the zip → it must be a holai backup (manifest with app: "holai", kind: "backup") and contain db/holai.db.
    • After an apply everything behaves odd → run "Undo last restore" (it restores exactly the state from before the apply) or upload an older zip from the cloud.

    Last updated: November 2026