I've lost my data and metadata for movies only

My Plex Server is running on a desktop (Windows 10) … Somehow, My Movie Drives went haywire… content on movies only (everything else was intact) and I was showing no movies in library… My collections were intact however, no movies listed. When I went to manage library (movies) some drives were missing and some were showing just the drive and not specific folder where the movies were/and still are… after going back and correcting that… I refreshed everything however, everything I had ever done as far as metadata was not showing up… I would hate to think that I need to go back over 2000 movies and do again??? My app data / Plex Server is intact having over 20 GB of data… My ```
%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases file was intact as well… I tried following instructions to restore however, not sure that I am following how… so I have left that folder as it was… CAN ANYONE HELP? I would think that once I restored the proper folder names under each drive, everything should come back?? Any help would be greatly appreciated! Steve

If I understand your post correctly, it’s looks like you have a corrupt database. Follow the support article below.

Failing a repair you will need to do a total uninstall of Plex media server and start again.

The following is the correct way to uninstall.

Thank You for your reply… corrupt data base as to the movies only? everything else is fine…

Well if your a bit concerned , try re linking that library again and re scan.

I tried that … one drive at a time… my artwork etc… not showing up… my “collections” artwork and information is intact but the movies are missing… I think maybe during the mishap… plex scanned the entire drives and not the specific folder… could this have caused a problem with my database file? I tried following instructions to restore a backed up database with no success… sure I was not following correctly… any ideas other than redoing over 2000 movie files? I appreciate your help!

Are your movie media files stored on external hard drives?
And if so, maybe the relevant drive has gotten a different drive letter?
Inspect the Plex media info of a few movies and see at which drive letter and folder names Plex is expecting to find the files.
Then compare this to the currently assigned drive letter of the “movie” drive.

Thanks for your reply… the drive letter(s) have not changed… I checked… I never physically disconnected any drives from the server. Whatever occurred… happened within the Plex app and only with the movies… like I said, I think that Plex re-scanned the entire drives in Movies and not just the appropriate movie folder… perhaps this messed up the database folder? One other note … I did add a couple of new drives of movies to spare usb ports however… the server gave each drive a new drive letter… I think something to do with the backup database? All my media files in Plex are intact… Thanks for your time… Steve

I can only assume that during this procedure something went wrong.
If you don’t have internal drives, you should never activate this checkbox:
Settings - Server - Library - ‘Empty trash automatically after every scan’

I am utilizing some internal hard drives as well… 3 internal and 3 external plus the two new drives I put on externally for a total of 5 external… I have deleted all the movie drives in plex movie and going back one at a time to re-scan starting with my largest external drive…my empty trash auto after every scan is checked… should it be unchecked based on what I just described?

Yes, it should be unchecked. Because otherwise this may happen again.

so … I assume that I need to go thru and redo each movie file? and … once I uncheck the box… should I periodically manually empty the trash? Thanks for your help…

You can try and restore an older backup of your main database file: https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/
provided it goes back far enough.

Yes, but only after you have verified that there are only those items marked as ‘deleted’, which are supposed to be that way. (trash can icon over the poster)

my database file goes back far enough and I tried following that article but must be missing something… I made a copy of the file … deleted everything and then added back just the file detailed… to no avail… had to restore the file to get everything working again! I have attached a picture of my file… it goes back far enough… Dec 7th should work… Plex Database File|690x431 any suggestions?

Did you delete the .db-wal and db-shm files, like the article told you?
Was Plex server closed and gone from the task tray during the procedure?

Yes and Yes… before deleting anything… I exit Plex and here is what file looks like before I do any thing:

… Notice all 12-9 files and one 12-10 file go away… but when I start plex again the files return… with what I am showing in this picture (with plex closed) which files would you delete … Or do I delete the whole folder and add a new folder named something else?? This is where I am not sure… I appreciate your help!

None, they are already gone now.

No, not at all. If you did that, your whole libraries would be gone.

The window is quite small. How big are these files?

all files total just 1.02 Gb

should I delete all the shm and wal files leaving just the db files??? in instuctions… #
3. Duplicate the database backup file into the correct directory and then rename it to com.plexapp.plugins.library.db in the instructions is where I am confused…

There is probably no danger in doing so.

Yes, more like: rename the appropriate backup file to com.plexapp.plugins.library.db

rename all db files or just the most recent I want to keep?