Storage
DBLoom keeps its data in one volume mounted at /data, and one instance must own that volume.
What lives in /data
- The store. Users, second factors, encrypted profiles, the audit log table, and assistant conversations (account mode).
- The setup token, when one is generated.
- The import spool. Staging and spool files.
DBLOOM_TEMP_DIRdefaults to<data dir>/tmp, andDBLOOM_TEMP_QUOTA_MIBcaps the total (default10240).
Stateful: the default
DBLOOM_STORE=sqliteis the default.DBLOOM_DATA_DIRdefaults to./data. Compose mounts the volume at/data.- Keep the named volume mounted at
/dataon every deploy.
Size the volume for your traffic and your audit retention. DBLOOM_AUDIT_RETENTION_DAYS accepts 90 to 1095 days (default 365). Each statement-level audit row is about 150 to 200 bytes of payload.
Stateless: nothing on disk
DBLOOM_STORE=nonekeeps nothing on disk.- Stateless is direct mode only. Combining it with account mode is refused at startup.
- Audit lines go to stdout, plus any file sink you set.
- Assistant conversations live in server memory for the session.
read_only: truein the compose file works in both modes. Writes go to/dataand/tmp.
Single replica
Run one replica. Two instances on one store are detected. The second one exits with:
Another DBLoom instance uses this storeDo not scale to two replicas. Two instances on one volume are not supported.
What to back up
- The
/datavolume. Take a copy before every upgrade. - The server key. Either
DBLOOM_SECRET_KEYor the file inDBLOOM_SECRET_KEY_FILE. It lives outside the volume on purpose.
Store the volume backup and the key in different places. Without the key, TOTP secrets and recovery codes in a backup cannot be read. With the volume alone, nobody can read them either.
Upgrade and rollback
- Upgrade: build or pull the new image, take a volume backup, then redeploy.
- Rollback: redeploy the previous image. If the newer version changed the store, restore the pre-upgrade backup instead. Whether an older version can open a newer store is not tested.
Rotate the server key
- Set the new key as
DBLOOM_SECRET_KEY. - Set the old key as
DBLOOM_SECRET_KEY_PREVIOUS. - Restart.
- Run:
docker exec <container> node .output/cli/dbloom.mjs rotate-secret- Remove
DBLOOM_SECRET_KEY_PREVIOUS.
Last updated on