Tautulli Backups Failing over NAS Mount
Describe the Bug
Ever since 2.18.0 (beginning on 8/30), backups for my tautulli running on my GMKTec G3 Plus (Ubuntu 24.04 LTS) backed up to my mounted synology NAS (DSM 7.1.1) have been failing silently. I have configured my backup directory to be on my mounted /backup location passed through in the docker container.
I used claude to help me define the problem better than I could myself below:
Title: Scheduled database backup never completes when backup_dir is on an SMB 3.1.1 mount (v2.18.0+)
Summary
Since v2.18.0, make_backup() creates an intermediate SQLite database inside backup_dir via the SQLite backup API. With backup_dir on an SMB 3.1.1 mount, that call does not return. No database backup has been produced on this instance since 2026-08-29, and no log line is emitted for the failure.
Environment
| Tautulli | v2.18.1, commit 6d410e2a64a39af2c436df34f281ead858c06029 |
| Install | Docker, ghcr.io/tautulli/tautulli:latest |
| Container | created 2026-08-30T07:01:29Z, started 2026-09-06T18:14:36Z, RestartCount=0 |
| Host | Linux 7.0.0-31-generic x86_64 |
| Python | 3.13.15 in the container; 3.12.3 on the host |
backup_dir |
/backup → host /mnt/nas/backup/auto/tautulli |
backup_interval |
6 |
backup_days |
3 |
backup_dir is on an SMB share, mounted by the Linux kernel SMB client (module cifs.ko from fs/smb/client, which registers both the cifs and smb3 filesystem names). The negotiated dialect is SMB 3.1.1 — vers=3.1.1 below. From /proc/mounts:
//192.168.40.20/SysBackup /mnt/nas/backup cifs rw,relatime,vers=3.1.1,cache=strict,
uid=1000,forceuid,gid=1000,forcegid,file_mode=0755,dir_mode=0755,soft,nounix,
serverino,mapposix,rsize=4194304,wsize=4194304,actimeo=1,closetimeo=1The live database (/config/tautulli.db, 157 MB) is on local ext4. Only backup_dir is on the SMB share.
Observed behaviour
- Last successful scheduled database backup:
tautulli.backup-20260829211801.sched.db.zip, 2026-08-29 21:18. None since — 10 days, withbackup_interval = 6. - Config backups to the same
backup_dircontinue to succeed, every 6 hours, throughconfig.backup-20260908201445.sched.ini.zipat 2026-09-08 20:14:45. - A 0-byte
tautulli.snapshot.dbis present inbackup_dir, mtime2026-08-30 09:01:38, unchanged since. GET /api/v2?apikey=…&cmd=backup_dbdoes not return. An external HTTP client timed out at 30 s. The API key is valid —cmd=statusreturnsresult: success.- No log line is written for the attempt.
tautulli.logcovers 2026-07-20 21:32 → 2026-09-08 21:52, spanning the entire period, and contains:- no
Successfully backed up … .db.zipentry after 2026-08-29 - no
Failed to backup …entry - no
ERRORline matchingbackup
- no
Reproduction on the same mount
Run on the host (Python 3.12.3) against the same mount the container sees, with the source database created locally. Note the container itself runs Python 3.13.15 — the reproduction below was not executed inside it:
# A — plain write
c = sqlite3.connect("<smb_mount>/plain.db")
c.execute("CREATE TABLE t(a)")
# B — the call make_backup() makes (plexpy/database.py:364-366)
dest = sqlite3.connect("<smb_mount>/snap.db")
src.backup(dest)| Target on SMB 3.1.1 mount | Target on local ext4 (control) | |
|---|---|---|
| A plain write | sqlite3.OperationalError: database is locked |
completed, 0.0 s |
B Connection.backup() |
no return; SIGTERM at 45 s | completed, 0.0 s |
The control run used the identical script against a local path.
Code path
plexpy/database.py, v2.18.1:
341 def make_backup(cleanup=False, scheduler=False):
...
356 backup_folder = plexpy.CONFIG.BACKUP_DIR
357 backup_file_fp = os.path.join(backup_folder, backup_file)
...
363 snapshot = os.path.join(backup_folder, 'tautulli.snapshot.db')
364 dest = sqlite3.connect(snapshot)
365 db = MonitorDatabase()
366 db.connection.backup(dest)
367 dest.close()
368
369 with zipfile.ZipFile(backup_file_fp, 'w', zipfile.ZIP_DEFLATED) as zipf:
370 zipf.write(snapshot, arcname=FILENAME)
371
372 try:
373 os.remove(snapshot)There is no exception handling or timeout around line 366, and the snapshot path is derived from backup_folder.
When the behaviour changed
make_backup() in plexpy/database.py, from upstream release tags:
| Version | What is written into backup_dir |
|---|---|
| v2.15.0 | shutil.copyfile(db_filename(), backup_file_fp) |
| v2.16.0 | shutil.copyfile(db_filename(), backup_file_fp) |
| v2.17.0 | zipfile.ZipFile(backup_file_fp, 'w', ZIP_DEFLATED) |
| v2.18.0 | sqlite3.connect(snapshot) + db.connection.backup(dest), then zip |
| v2.18.1 | identical to v2.18.0 |
This backup_dir was in use and producing successful database backups from 2026-04-11 through 2026-08-29 under v2.17.x and earlier.
The change was made in commit 7e351fe4e9 — "Backup database using snapshot instead of copy", 2026-07-06:
- db = MonitorDatabase()
- db.connection.execute("BEGIN IMMEDIATE")
+ snapshot = os.path.join(backup_folder, 'tautulli.snapshot.db')
+ dest = sqlite3.connect(snapshot)
+ db = MonitorDatabase()
+ db.connection.backup(dest)
+ dest.close()
+
with zipfile.ZipFile(backup_file_fp, 'w', zipfile.ZIP_DEFLATED) as zipf:
- zipf.write(db_filename(), arcname=FILENAME)
- db.connection.rollback()
+ zipf.write(snapshot, arcname=FILENAME)Before this commit, the only file written into backup_dir was the finished zip. After it, a SQLite database is created there first.
The v2.18.0 changelog contains no entry for this change. The only two entries mentioning "database" or "backup" are "Various database optimizations to improve performance of history queries" and "sql API command making database backups on every query", neither of which is this code path.
Scope note
Measured on SMB 3.1.1 (Linux kernel SMB client, module version 2.59, kernel 7.0.0) against a Synology DSM server. Not tested on NFS, and not tested on other SMB dialects.
Steps to Reproduce
This exists in every backup produced since 8/30 on 2.18.0+ when running the backup over a mounted connection:
- mount the connection to the environment
- configure the docker container to see this mount
- configure the app to use this mount for backups.
Expected Behavior
The backup should complete successfully within the NAS mount.
Screenshots
No response
Relevant Settings
DSM 7.1.1
Tautulli Version
v2.18.1
Git Branch
master
Git Commit Hash
6d410e2a64a39af2c436df34f281ead858c06029
Platform and Version
[Docker] Linux 7.0.0-31-generic (#31~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Aug 10 09:38:02 UTC 2 - Debian GNU/Linux 13 trixie)Python Version
3.13.15 (main, Aug 10 2026, 21:10:14) [GCC 14.2.0]
Browser and Version
Chrome Version 152.0.7977.83
Link to Logs
https://gist.github.com/mjw210/054caa323ec4e333b6672f688b32f872
Source: Tautulli/Tautulli