Hello, something bad happened to my server. machine is completely dead, system drive too.
The only thing I have left is a backup of my windows user folder
so I got a new computer, install Plex server
then I copied this folder (17 GB) from my backup to my new PC:
C:\Users\htpc\AppData\Local\Plex Media Server
My issue is that as soon as I start Plex Server, I get this error:
Corrupt database
Plex Media Server was unable to open its media database.
the program won’t start and crashes immediately.
I check the database with the sqlite utility:
"C:\Program Files\Plex\Plex Media Server\Plex SQLite.exe" com.plexapp.plugins.library.db "PRAGMA integrity_check"
ok
didn’t see it as corrupted
I ran the repair utility, didn’t do anything.
I restored multiple previous versions of the DB and all give me the same error.
compared to my previous server change, I only see the registry entry that I’m missing.
is the registry entry that important?
do I have other options?
The question is: does Plex run on this new machine under the same Windows user account?
Otherwise it would look at a different folder location for its data.
If you have copied the Plex data folder directly from a NTFS volume, the myriads of files, folders, and subfolders therein may have inherited their original access permissions (from the old system). Since this is a new machine and very much likely a fresh Windows installation, the user ID (number) for the user account htpc is different now.
Which means you may have to reset all these access permissions so they inherit them from their parent folder (which in this case is probably C:\Users\htpc\AppData\Local\)
You can do that manually using the regular folder properties dialog of Windows, or you can use a specialized tool which makes it a bit easier: Resetting NTFS files permission in Windows – Graphical Utility – lallous' lab
Hello,
thank you for suggestion.
I don’t think access permissions can be an issue here.
first, I migrated my plex server from old pc to new pc for the last 15 years now and never had an issue with windows access permissions before.
yes, the backup disk is ntfs but when you copy the file from source (external USB disk containing backup) to destination (C:\Users\htpc\AppData\Local), windows access permissions are set at time of writing for the user currently logged in. that’s what I understood from microsoft documentation. but of course, just in case, I did what you suggested:
I reset permission on the plex folder and all its sub-.folder. I still got the same message.
I run plex as admin (to bypass any permissions issue) and got the same error
Your last suggestion (“You may have to go back to a previous backup”) was already tested as suggested in my initial post (I think I tested 4 older backups spanning weeks)
I want to believe that if the database was corrupted, Plex integrity utility check would have reported an issue.
Unfortunately, it is not able to catch all types of damage.
Verify again that Plex is not looking in the wrong spot for its Plex data folder.
Inspect the `/Logs´ subfolder. Are there fresh logs inside? Or are there only old logs in there?
Did you use a different location (i.e. other than the default) for the Plex data folder on the old machine?
If so, and you imported the registry data of the old machine, then this redirection was carried over.
A HA. the logs show me something: you checked your com.plexapp.plugins.library.db database. But FYI plex has several databases it uses. The logs show that com.plexapp.plugins.library.blobs is the one that is corrupt. Rerun the PRAGMA check on that database.