Does the PLEX server need to have so many files?

I have a fairly large PLEX server. Certainly not as large as some folks here. Half a million MP3 files, about 5000 movies, etc. The PLEX database files add up to over 90 gigs and 6.6 million files. Does it really need 6,600,000 files to keep track of all that? Every song, every movie, every show seems to create an entire folder structure of stuff. Is all of that really needed?

Most of that size is probably just the preview images for your movies. I don’t have such a large library as I once did due to a HD failure a few years ago but even when i had about 2000 movies 7000 tv episodes, my PMS folder never got larger than 4 GB. I personally don’t find preview images to be necessary for the way I use Plex so I turn them off.

Apparently.

Just be glad you weren’t around during the days when trash and clean-up went to the recycle bin:
Deleting 49,987 files… … … … “Go plant a tea farm in Indochina, this could take a while”…
Don’t miss those days.

Just do regular database optimizations/bundle cleanings and you’ll be fine.
If you need more space store the database on a local HDD with ample space and pretty much forget about it.

Remind me if possible, where do these preview images show up? If I can lose them I would love it.

Edit the library/advanced/delete preview thumbs

Be Sure.

They are for when you are scrubbing a video (dragging the timeline slider to move to another point) You can delete existing from the when editing a library as @JuiceWSA mentioned. And you can turn off creation of new ones completely in the library setting of the server.

1 Like

I’m turning that off on everything. I’ll report back what the net result was. thanks to everyone.

After doing all that the file size is still around 90 gig but the number of files has dropped to 2.6 million from 6.6 million,

That’s odd.

If you haven’t already, clean bundles and optimize the database might be a good idea now that things have really changed in there…

Did that. No change. 93 gig, 2.6 million files. Hey, it is better than 6.6 million.

What exaclty is your problem here? You seem to be spending thousands of $currency on disk space for more than 100TB of Storage, yet 90 Gigs for a Library seem annoy you. Also the architecture of plex (creating subfolder and X-amount of files) doesnt really have to be your concern. So why are we talking about this?

I backup that directory from time to time and it takes days to back up something with 6.6 six million files - regardless of the size.

instead of plex using the file system as a database, it should be using a database to store all that metadata and files.

one main db
another db for video thumbs
another db for chapter thumbs
etc

better to have a handful of separate database files of large size, than 6+ million file directory structure.

3 Likes

So then why didnt you put this in the headline then? “Help I cant properly backup all the files plex is generating.”

I could have then told you that your backup strategy is probably wrong and that in modern software architecture at a certain scale (which you are extending to) a couple of million files in under 100G is nothing uncommon. I could also tell you that you that copying that folder manually does not guarantee a consistent backup, as there is also an actual database in there, so you shouldn’t be doing that anyway. And hopfully the plexserver is not running without any isolation/ compartmentalization so you should do backups on that level instead. E.g. qcow: snapshot/ backup/ merge snapshot.
If it really must be on the file levelm, do an icremental backup (backup only new/ changed files) preferably to something like an zfs snapshot.
Also automate that process so it can run in the night and might not even matter if it takes 1 or 5 hours.

Cheers, always happy to help when you ask the right questions.

… and there’s an automatic backup of the database - every 3 days by default (if enabled) - which is:

  1. Fast

  2. Automatic

  3. Happens in the background during maintenance

  4. is virtually painless

  5. includes everything you need to restore your Plexiverse in the event you need to restore your Plexiverse (with a version not more than 3 days old - by default if checked).

  6. and the backup directory can be put - many places - if the stock location doesn’t suit (it doesn’t, of course - that’s why you can change it).

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