I’m going to be moving my plex install into my kubernetes cluster, off a dedicated host. While looking at how much data I have to migrate, I was digging around in the plex folder and found the Database folder was 74GB. That seemed rather large, so i went in and looked, and see hundred of “tmp files”:
-rw-r--r-- 1 evan evan 1051874304 Oct 29 03:01 com.plexapp.plugins.library.blobs.db-2020-10-29-tmp
-rw-r--r-- 1 evan evan 218365952 Nov 1 03:00 com.plexapp.plugins.library.db-2020-11-01-tmp
-rw-r--r-- 1 evan evan 1051632640 Nov 1 03:01 com.plexapp.plugins.library.blobs.db-2020-11-01-tmp
-rw-r--r-- 1 evan evan 219467776 Nov 4 03:00 com.plexapp.plugins.library.db-2020-11-04-tmp
-rw-r--r-- 1 evan evan 1052849152 Nov 4 03:01 com.plexapp.plugins.library.blobs.db-2020-11-04-tmp
244 to be exact:
ls |grep tmp |wc -l
244
these appear to be backups, but they should be going to a /backups folder, not stored here. Are these save to delete? I assume so, since they go back to 2019.
Thanks!
Edit: I just checked my backups folder, it hasn’t been touched since 2019…so it seems plex stopped backing up to the backup folder and has just been keeping local copies
Plex saves the backup within the database folder by default (it can be changed within the settings under Scheduled Tasks), however it normally only keeps like 5 backups and I’ve personally never seen ones ending with -tmp.
I’d suggest checking your logs to see if maybe there is something in there that would explain this behavior as it definitely doesn’t seem normal. I just checked mine and my last backup is from 2020-10-26 for each database.
thanks for the confirmation. I checked my /backups folder and it hasn’t been writing anything lately. I’ll have to take a look at the logs, in the meantime I’ve chmod’d it to 777 just to rule out a permission issue.
No problem. Hopefully it helps figure out the issue, otherwise could always trying pinging one of the team members/ninjas to see if they can figure out what’s going on.
On a different note, this did make me realize I could set up my docker container so that I can have the backups save to a different location that I can more easily get to as well as so that I can have them covered by Snapraid for a little added protection. So thanks for that!
IF you have network mounts / containers – which I presume is common in Kubernetes?
If it gets dinged somewhere else (UID/GID changed) there’s no way PMS will know until it starts failing and screaming in the logs (if it can still write to the logs)
If this is happening then best of luck to you because PMS isn’t written to work in networking environments where the logical host is distributed across multiple physical hosts (AMP not SMP)
Thanks it ended up being a permission issue on the backup folder… must’ve accidently changed it at some point.
It’s actually extremely handy to have the docker container (or in my case, Kubernetes) backup the backups to an NFS mount. This contains backups of all apps that can perform backups, which then get’s offsited every 3 days to Wasabi cloud storage. (from Freenas). Extremely handy and reliable (when you don’t screw up your permissions).