Skip to content
🚧 These docs are a work in progress and may contain inaccuracies. Content is being actively reviewed and validated.

Backups

Dubby stores all its persistent state in the data directory. Regular backups protect against data loss from hardware failure, corruption, or accidental deletion.

DataLocationContains
DatabaseDUBBY_DATA_DIR/dubby.dbUsers, libraries, metadata, watch progress, settings
WAL filesDUBBY_DATA_DIR/dubby.db-wal, dubby.db-shmUncommitted database transactions
Image cacheDUBBY_METADATA_CACHE_DIRCached TMDB artwork
Trickplay spritesDUBBY_TRICKPLAY_CACHE_DIRSeek preview thumbnails
  • Transcode cache — Temporary files, regenerated on demand
  • Log files — Useful for debugging but not critical
  • Media files — Back these up separately; Dubby doesn’t modify your media

For a consistent backup, stop Dubby first to ensure the SQLite database isn’t being written to:

Terminal window
docker compose stop dubby
Terminal window
cp -r /path/to/dubby-data /path/to/backup/dubby-data-$(date +%Y%m%d)
Terminal window
docker compose start dubby

SQLite in WAL mode supports concurrent reads during writes. You can copy the database while the server is running, but you must copy all three files together:

Terminal window
sqlite3 /path/to/dubby-data/dubby.db ".backup '/path/to/backup/dubby.db'"

The .backup command creates a consistent snapshot even while the database is in use.

Create a daily backup with a cron job:

/etc/cron.d/dubby-backup
0 3 * * * root sqlite3 /path/to/dubby-data/dubby.db ".backup '/backups/dubby-$(date +\%Y\%m\%d).db'" && find /backups -name "dubby-*.db" -mtime +7 -delete

This backs up at 3 AM daily and removes backups older than 7 days.

If using Docker named volumes:

Terminal window
docker run --rm \
-v dubby-data:/data:ro \
-v /path/to/backups:/backup \
alpine tar czf /backup/dubby-data-$(date +%Y%m%d).tar.gz -C /data .
Terminal window
docker compose stop dubby
Terminal window
rm -rf /path/to/dubby-data/*
cp -r /path/to/backup/dubby-data-YYYYMMDD/* /path/to/dubby-data/
Terminal window
docker compose start dubby

The server checks for pending migrations on startup and applies them if needed.

  • All user accounts and sessions
  • Library configurations and paths
  • All metadata (titles, descriptions, artwork references)
  • Watch progress and continue watching state
  • User preferences and settings
  • Feature flag configurations
  • Invite codes and permissions
  • Active streaming sessions (ephemeral)
  • Cached transcodes (regenerated on demand)
  • Trickplay sprites (regenerated on demand, but backing up saves regeneration time)