Backup & Restore
Trailarr automatically backs up its database on every startup, right before running any database migrations. You never need to do anything for backups to happen — this page explains where they live and how to use one to recover or roll back to a previous version.
Where backups live
Backups are stored inside your config folder (APP_DATA_DIR), next to the database:
/config/ # your mapped config folder (Docker default)
├── trailarr.db # the live database
└── backups/
├── trailarr_20260705081530.db
├── trailarr_20260628102201.db
└── ... # most recent 30 backups are kept automatically
Each file is a complete copy of the database, named
trailarr_YYYYMMDDHHMMSS.db with the time the app started. Trailarr keeps the 30
most recent backups and deletes older ones automatically.
💡 Since a backup is taken on every startup, restarting Trailarr right before an upgrade guarantees you have a fresh pre-upgrade backup.
Restore a backup
Use this when the database is damaged, or something went wrong after an upgrade.
- Stop Trailarr (
docker stop trailarr, or stop the service for direct installs). -
In your config folder, keep a copy of the current database just in case:
-
Copy the backup you want over the live database:
-
Start Trailarr again.
That's it. If the app version is the same or newer than the one that wrote the backup, any needed database migrations run automatically on startup — restoring an older backup into a newer version is always safe.
Roll back to a previous version
If a new release misbehaves for you, roll back the app and the database together:
- Stop Trailarr.
- Restore the backup taken before the upgrade (see above — pick the newest backup from before the day you upgraded).
-
Pin the previous image version instead of
:latest. In your compose file:Then
docker compose up -d. For direct installs, reinstall the previous release. -
After Trailarr is up, verify your library looks right, and please open an issue describing what went wrong with the newer version — rollbacks are a bug report we want to hear about.
⚠️ Always restore a matching (or older) backup when downgrading. A database that was migrated by a newer version is not compatible with an older app version — starting an old version against a new database can fail in confusing ways. The pre-upgrade backup is exactly the right file for a rollback.
Notes
- Backups cover the database only (media records, downloads, profiles, settings
stored in the DB). Your
.envsettings file, downloaded trailer files, and images live outside the database and are untouched by upgrades or restores. - Want an extra safety net? Include the whole config folder in your normal backup
tooling (it's small) — that covers
.envand the backups folder itself.