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.
Required coverage
Section titled “Required coverage”| Item | Default location | Purpose |
|---|---|---|
| Knowledge and semantic history | vector-store/ | Embedded ChromaDB state |
| Conversation messages | data/conversations.db | SQLite history |
| Configuration | .env and service configuration | Runtime settings and credentials |
| Source revision | Git commit identifier | Reproduce application code |
| Dependency versions | Project requirements and environment snapshot | Reproduce store-compatible runtime |
| Model inventory | Ollama model names and versions | Recreate inference environment |
Existing script limitations
Section titled “Existing script limitations”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.
Backup procedure to establish
Section titled “Backup procedure to establish”- Schedule an interruption and stop all writers, including CLI memory helpers and monitoring that restarts the backend.
- Capture every required component above using a database-consistent method.
- Restrict backup access because configuration and conversations contain secrets or private data.
- Record checksums, source revision, timestamp, and model/dependency inventory.
- Verify restoration in an isolated location before declaring the backup usable.
Restore rehearsal
Section titled “Restore rehearsal”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.