Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/tutorials/maintenance/backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ However your instance is provisioned, it's worth inspecting the app's data store
| File/Directory | Description |
|---|---|
| `audit.log` | Log file for auditing events. |
| `cache/` | Directory for storing cached data. |
| `cache/` | Downloaded models for embeddings and speech (a Hugging Face cache). Re-downloaded on demand, so safe to exclude from backups; on a fresh instance it is already larger than everything else here put together, and it contains symlinks. Two of the three example scripts below exclude it. |
| `uploads/` | Directory for storing user-uploaded files. |
| `vector_db/` | Directory containing the ChromaDB vector database. |
| `webui.db` | SQLite database for persistent storage of other instance data |
Expand Down Expand Up @@ -398,6 +398,22 @@ This backup plan is a little more complicated but also more comprehensive .. it
| Daily Incremental | Cloud Storage (B2) | rsync | Daily incremental backup pushed to a Backblaze B2 cloud storage bucket. |
| Weekly Incremental | On-site Storage (Home NAS) | rsync | Weekly incremental backup pulled from the server to on-site storage (e.g., a home NAS). |

# Restoring

Restoring is the mirror of the backup: stop the stack, put the data directory back, start the stack.

```bash
docker compose down
# replace the contents of the persistent data directory (the volume, or the
# host path you bound) with the backup, keeping the same ownership
docker compose up -d
```

Two things to check before starting it again:

- if you copied files individually rather than the whole directory, `webui.db-wal` and `webui.db-shm` have to come with `webui.db`, or the newest writes are missing; a copy taken with SQLite's `.backup` command does not have this problem;
- `cache/` does not need to be restored - Open WebUI downloads the models again on first use.

# Additional Topics

In the interest of keeping this guide reasonably thorough these additional subjects were ommitted but may be worth your consideration depending upon how much time you have to dedicate to setting up and maintaining a data protection plan for your instance:
Expand Down