TMP database not cleaning up after backup

Server Version#: 1.41.8.9834
Player Version#: 4.147.1

TMP database not cleaning after Scheduled Tasks backup. The backup is successful, both main database and backup ones check out ok, no signs of corruption.

 "/usr/lib/plexmediaserver/Plex SQLite" /mnt/plexdata/Backups/Plex/com.plexapp.plugins.library.db-2025-06-11
SQLite version 3.39.4 2022-09-29 15:55:41
Enter ".help" for usage hints.
sqlite> PRAGMA integrity_check;
ok
sqlite> VACUUM;
sqlite>

But yet still it fails to cleanup, from the tmp database pile up this started happening sometime in December, unfortunate didn’t notice till last month and i have been trying to fix issue since then with no success.

The DB integrity check cannot catch all issues.
A full export/import cycle is more thorough. Use this GitHub - ChuckPa/DBRepair: Database repair utility for Plex Media Server databases

I seem to remembner that it might also be connected to a permission issue.

1 Like

Issue was with backup share location. It seems for Plex to clean tmp database the user Plex is running as needs to be listed as owner of share files and folder even if permissions is 777.

Added uid=1003,gid=1003 to mount in fstab and last night the backup worked as expected.

//192.168.5.10/data /mnt/data cifs credentials=/root/.cifs/plex,uid=1003,gid=1003,dir_mode=0777,file_mode=0777

Question now is what changed to require ownership on share, as this has been working for years :thinking:

No, it was permissions issue as mentioned in solution.

Sorry about the location confusion, I copy files out of original location when ever i want to work on them.

If you’re running on a Linux host , mounting a Linux network share, why are you using CIFS when NFS makes this infinitely easier ?

Well not sure what to tell you. Already had dir_mode and file_mode 777 for years which stopped working in December, added uid=1003,gid=1003 to mount and now it works.

Specify uid=1003,gid=1003 in the mount fixed the issue which suggest Plex now has something checking file and/or backup directory ownership during backup.

Personal preference, I like CIFS better. Plus NFS that wound have had the same issue if uid and gid not specify.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.