Backup & restore¶
In the app
Settings → System → Backup summarizes what to back up and links this page at /wiki/ops/backup-restore/ when the wiki is bundled.
In-app reset is not a volume wipe
Settings → System → Reset Horde restores app_settings.json to defaults and re-runs the setup wizard. With Erase all media, it deletes library files inside the mounted downloads directory and related DB rows. It does not change Compose host paths, cookie files, or env API keys. To throw away an entire dataset, snapshot/delete the host DATA_PATH and DOWNLOADS_PATH volumes instead.
What to back up¶
Back up both volume roots used by Compose (or your local dirs):
| Host path | In-container | Contents |
|---|---|---|
DOWNLOADS_PATH |
DOWNLOADS_DIR (/downloads) |
Media library, imports, subtitle sidecars |
DATA_PATH |
DATA_DIR (/app/data) |
horde.db (and WAL sidecars horde.db-wal / horde.db-shm), settings, caches, user fonts/backgrounds, profile pictures |
If you restore a file into DATA_PATH yourself (for example horde.db from a backup, as root), you do not need to chown it: on the next start the container notices any file in the data directory with the wrong owner or group and repairs the ownership.
update.sh additionally takes a verified online SQLite backup before every update (see Updating); it only covers horde.db.
A consistent snapshot of both keeps file paths and DB rows aligned. Backing up only the DB without media leaves broken library entries; media without the DB loses titles, tags, progress, playlists, and AI meta.
Stop or quiesce
Prefer stopping Horde (or at least pausing downloads/AI) briefly so SQLite and in-flight .part files are quiet. For ZFS/TrueNAS, a dataset snapshot of both mounts is ideal.
Horde also writes DATA_DIR/backups/horde-pre-*.db before it migrates the database to a newer schema or repairs rows an older version left behind (the newest five are kept) and app_settings.json.bak beside the settings file. These are safety nets, not a replacement for your own backups: they live on the same volume.
Nightly database backups¶
Once a day Horde copies the database (VACUUM INTO, a consistent snapshot taken while Horde keeps running) to DATA_DIR/backups/horde-nightly-YYYYMMDD.db.
| Variable | Default | Effect |
|---|---|---|
HORDE_BACKUP_ENABLED |
1 |
Set to 0 to turn nightly backups off. |
HORDE_BACKUP_HOUR |
4 |
Local hour (0-23, so 0 is midnight) after which the day's backup is taken. |
HORDE_BACKUP_KEEP |
7 |
How many nightly files to keep, minimum 1 (it does not disable backups). Older ones are deleted. |
- If Horde was stopped at the backup hour, the backup runs as soon as it is back up later that day.
- A same-day backup is only taken once; delete today's file to force another.
- Pruning only touches
horde-nightly-*.db. Thehorde-pre-*.dbmigration copies and anything else you put in the folder are left alone. - The backup covers the database only (library rows, tags, playlists, progress, AI metadata). Media files and
app_settings.jsonstill need your regular volume backup.
To restore one, stop Horde, copy the chosen file over DATA_DIR/horde.db, delete horde.db-wal and horde.db-shm next to it, and start Horde.
Regenerable (safe to omit or delete)¶
These can be rebuilt after restore:
| Data | How it comes back |
|---|---|
Thumbnails (data/thumbnails/) |
Regenerated from media / source metadata |
Sprites (data/sprites/) |
Regenerated for seek previews |
Embeddings (rows in horde.db) |
AI Re-embed everything / embed jobs after providers are online |
Also regenerable: feed_meta_cache.json (refills as you browse channel feeds).
Not regenerable without re-download or re-entry: video files, custom titles/notes, playlists, watch history, OpenRouter usage ledger, uploaded fonts/backgrounds.
Restore checklist¶
- Restore
DATA_PATHandDOWNLOADS_PATHto the mounts Compose expects. - Confirm
PUID/PGIDcan read/write both trees (permissions). - Start Horde; orphan cleanup runs on startup for missing files.
- If you wiped embeddings or changed models, run Re-embed everything (Maintenance).
- Confirm
/api/healthand open the library.