Plex DB schema drift between db updated over time and fresh install

The current updates from this point DBRepair development - #918 by Tony_T in the thread got me thinking about the plex schema. Basically, how what is created today from a fresh install might be different when compared to what I have within my db which has been updated over the past number of years.

So using …

"/usr/lib/plexmediaserver/Plex Media Server" --sqlite com.plexapp.plugins.library.db '.schema' > com.plexapp.plugins.library.db.schema.sql

… I exported the schema from my current db and one from a fresh clean install. I was kinda expecting a few small difference as drift is kinda normal and migrations might skip stuff which is not critical but there are far more than I was actually expecting.

My os is linux fedora 43, running on actual hardware and server version is 1.43.0.10492. Attached below is the actual sql from my db (mydb-com.plexapp.plugins.library.db.schema.sql) and the one from a fresh install (fresh-com.plexapp.plugins.library.db.schema.sql).

plex-db-schema-comparision.zip (11.2 KB)

Not looking for any actions and am passing along as information to the dev team if they are interested. I’ll probably fresh install my server at some point and fixup/import the tables/data I want to keep for watch status / history from old to new.

Any suggestions (or links) for doing a Fresh install while retaining my Posters, Backgrounds , Ad Markers (though I can just re-trigger that one), etc.

If you use local assets for artwork it will be maintained which is one reason why I only use local assets. I never need to worry about it if I have to rebuild and they are also shared with other media managing software.

Markers are a different story, there is no way to maintain these and they would need to be redone by the server. We disable intro & credits. While we initially though they where good over time we as a family got annoyed by them so we remove them and never looked back.

I only use local assets for Music. My Posters, Background and logos are all downloaded My Library isn’t too large, so wouldn’t be too much work to recreate. And Ad Markers will just take a day or so to redo.

Might be worth the effort as I’ve also went through a migration from a raspberry pi 3 to a raspberry pi 5 and to my current Asus NUC 13 pro

Would I need to backup anything besides the DB and Blobs to revert if I find I need to?

(I have a weekly Tar of /var/lib/plexmediaserver/, so I guess I could use that if I needed to revert)

Have a look at this thread if your interested Corrupt Database - Transferring User Information - #72 by anon5074910. User anon5074910 is my old account so any comments in that thread are mine.

This is a more advanced backup / restore method but works, I’ve done it a few times and I know others have also. It has been a few years since I’ve done it as I never seen the need. However, I kinda overdue a clean slate.

Also, I’ve heard the Sync Your Watch State and Ratings works well but that’s not for me.

Been thinking about this and just created a python script to use the Plex API to save my selected Posters, Backgrounds and Logos to use as Local Assets. I uploaded the script, but still in testing phase.