I noticed in my backups folder my PLEX database has grown 20Gb out of the blue with the last few beta pass updates. I’ve not added more than a few movies or show episodes in the last week or anything that would cause this kind of massive growth.
Does anyone know how I can clean this up or “fix” the size? I can’t run the Optimize function either now, the entire server just hangs and eventually freezes/stops loading.
For anyone coming behind me looking for a solution, the DBRepair tools did not shrink the database back down. What worked was running these commands manually (you may have to adjust DB location if you stored it somewhere else). Shrunk my 24Gb database back to 2Gb in moments.
c:\>"C:\Program Files\Plex\Plex Media Server\Plex SQLite.exe" "%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db"
sqlite> delete from statistics_bandwidth where account_id is NULL;
sqlite> VACUUM;
sqlite> .quit
AFAIK not both Windows versions might contain the necessary commands. And you’d need to download the latest version, not use one that you may have downloaded up to a few days ago.