Skip to content

Back up and restore the lab

Outcome: know what a recoverable backup must contain. Perform restore rehearsals in an isolated destination before relying on a recovery target.

ItemDefault locationPurpose
Knowledge and semantic historyvector-store/Embedded ChromaDB state
Conversation messagesdata/conversations.dbSQLite history
Configuration.env and service configurationRuntime settings and credentials
Source revisionGit commit identifierReproduce application code
Dependency versionsProject requirements and environment snapshotReproduce store-compatible runtime
Model inventoryOllama model names and versionsRecreate inference environment

scripts/backup.sh copies the vector store, configuration, logs, and dependency list. It does not back up the conversation database, does not stop writers, and can print a success summary after component failures. Its retention value is hard-coded to seven days. Do not call its output a complete, application-consistent backup.

Deploy-time backups include the SQLite database but also need consistency verification. A copy of live database files is not automatically a consistent snapshot. Same-host backups do not protect against host loss.

  1. Schedule an interruption and stop all writers, including CLI memory helpers and monitoring that restarts the backend.
  2. Capture every required component above using a database-consistent method.
  3. Restrict backup access because configuration and conversations contain secrets or private data.
  4. Record checksums, source revision, timestamp, and model/dependency inventory.
  5. Verify restoration in an isolated location before declaring the backup usable.

Restore code and compatible dependencies, configuration, SQLite, and the entire vector store into a separate environment. Start with localhost-only access. Verify a known conversation, a known retrieved document, and actual inference. Record elapsed recovery time and the newest restored record.

The project has discussed a 24-hour recovery point and one-hour full restore target. These are planning targets, not measured guarantees. Only a recorded rehearsal can establish them for your installation.

Next: Storage reference and update planning.