Skip to content

Data & backups

File Purpose Protection
users.db User accounts, mobile device tokens and one-time pairing codes Passwords hashed with bcrypt; tokens and codes stored only as SHA-256 hashes
tokens.db Per-user, per-instance Sonarr URLs and API keys Fernet encrypted
.master.key The key that encrypts tokens.db File mode 0600. Keep it safe
sonarr_history.db Analyses, per-series savings and schedules Not encrypted
tls/cert.pem, tls/key.pem The self-signed HTTPS certificate, only with SONARR_ANALYZER_TLS=self-signed Key file mode 0600

Backing up and restoring the whole folder keeps your mobile devices paired: their tokens are in users.db, and the certificate they pinned is in tls/. Without tls/, a new certificate is generated on the next start and every phone has to pair again.

Stop the container first: copying the SQLite databases while the scheduler writes to them can leave an inconsistent .db in the backup. --volumes-from reaches the container’s /app/data whatever it is: a named volume, the project-prefixed volume Docker Compose creates (like myfolder_sonarr-data), or a bind mount.

Terminal window
docker stop sonarr-analyzer
docker run --rm \
--volumes-from sonarr-analyzer \
-v "$(pwd)":/backup \
alpine tar czf /backup/sonarr-backup.tar.gz -C /app/data .
docker start sonarr-analyzer

The container must exist. On a new machine, create it first with your usual docker run or docker compose up -d, then:

Terminal window
docker stop sonarr-analyzer
docker run --rm \
--volumes-from sonarr-analyzer \
-v "$(pwd)":/backup \
alpine tar xzf /backup/sonarr-backup.tar.gz -C /app/data
docker start sonarr-analyzer

See Upgrading.

Sonarr Analyzer v0.7.0 · GitHub · Docker Hub ·Report an issue

No trackers · MIT License · © Carlos Medina · Not affiliated with Sonarr