if you click on the spanner for the settings
Then under grey settings on the left hand side, click on scheduled tasks
Then tick the box backup database every 3 days
This will provide some protection. Though for me it does not appear to go back very far i cant speak for other operating systems/environments but it probably needs fixing given the trivial size of the databases.
if you click on show advanced it will let you see the backup location.
Failing that. at least on gentoo, the database is backed up with every server version update. I think this may be a custom thing rather than plex.
i guess rather starting over from scratch if that box was ticked, you could try and look for corruption in each backup file and rebuild from the most recent version without it. But i would recommend going back at least 2 versions back out of an abundance of caution.
Still corruption scanning etc can only pick up so much, you are running the risk of corruption still being in there and it slowly rotting the database again. Unfortunately Sql lite is known to be problematic at scale/heavy use. Plex devs seem to be highly reluctant to change this for various reasons
I wouldn’t say it will always happen, rather just often enough, to enough people, across enough implementations regardless of software to gain universal notoriety. At the same time it has many distinct advantages, for simplicity of installation and use, and compatibility it can be plonked on almost everything. So more often than not its used in pretty much everything consumer grade (like a phone app) and not server grade Implementations like (setting up a website). Plex falling somewhere in-between makes it a tough call.
Its kind of not their fault, it kind of is… with the inevitable march of mores law were most aspects of technology have a tendency to quadruple in capacity every 4 years having a big spread of database backups will make how often they are backed up and how many to keep a moot point and trivial expense and 100tb SSD drives are already possible. We sill see storage increases in peripheral devices ramp up soon.
The thing is, that 4k resolution is already beyond the limits of human perception for the most part, and 8k tvs coming out. There is an innovation cliff were there will no longer be any meaningful increase in terms of quality the only thing they can do to keep propping up prices is to make them smarter other than curved/immersive (360deg filming) uncompressed 8k is 48Gb/s though so there will be some serious hardware hiding behind that. They already have a backlight for every pixel.
err… sorry for getting a little lost, overtired and scatterbrained … how did i get here?