Plex Media Server deleted my files - need help!

The log shows that the command came from a device using your Plex account. Could you get me the log from your cousin’s device?

Can’t tell from that. Please provide the entire log file.

how do I grab logs from his samsung s9? he lives a bit far away and he is not tech savy. Going to be hard for me to walk him through it…

The thing I am concerned about is I never gave him full admin access.
I only have ONE user account that has admin access that is protected by a pin and I am the only one that knows it.

So If he indeed somehow clicked “Delete” from him phone, how would he be able to delete on the server side without admin access? I think that is where the bug may be. Maybe with the plex app on the samsung phone he logs in with my admin login/password and the PIN does not pop up and he has full admin access and he accidentally deleted about 10 movies (which would be sort of strange for him to do)

That’s probably exactly what happened. No mater the case and how innocent it was… Never give your username/password to anybody. You should not create a PlexHome with him. Have him create a plex account(FREE!!) and share the libraries with him.
https://support.plex.tv/articles/201105738-creating-and-managing-server-shares/

If he doesn’t have an account then he’s using yours.

Hi. I lost all my movies too. I am an old member but a new user. I have been subscribed for ages but recently discovered how beautiful the live tv interface is and have started using it. Since I am using the app now, I decided to add some of my movies. I started adding movies yesterday. So, all my files should be less than about 30 hours old, with most being less than 24 hours for sure. I have not optimized or configured any DVR options. “Empty trash automatically after every scan” and “Allow media deletion” were both checked. My movies all seemed to disappear when I ran a scanned libraries to validate my last movie. The last thing I think I did before adding this movie to the directory and scanning libraries was to delete an old photos library that we didn’t want, after which I got the message about the media not being affected.

While adding movies previously, I had been adding a file, scanning libraries, then watching a few seconds from the beginning and a few seconds from the middle of each movie from a client app to verify the metadata was found and accurate and that the file looked okay. This had worked fine every other time but this time all my movies in my movie library disappeared. I immediately navigated to the drive and the library folder and saw all but the new movie was gone. I checked the recycle bin and found other files, but none of my missing movies. I checked the same drive (which is an internal 3TB HDD) but the folder for my TV Shows library, and it is intact with all files. I searched (manually and with the search bar) for filenames I new were missing. I googled and found this forum. I started a chkdsk /r. I noticed that my drive now reads Local Disk L:, while it usually reads Library L:. I assume that could be because the disk is offline for the check, but didn’t notice before. I am not sure this is right, so let me know if this could have caused this (I hope not, because deleting all your files is a harsh punishment for saving them in the wrong place), but my file structure was sort of like this:

L:\Movies\

\movie1 (yyyy).mkv

\movie2 (yyyy).mkv

L:\TV Shows\

\ShowName (yyyy)\

\s01e01.mkv

\s01e02.mkv

\s02e01.mkv

etc.

I tried reading some logs, but have trouble making sense of them, like many other new users. The only thing that jumps out of me as alarming is the following section from Plex Media Scanner.1:

May 16, 2020 15:05:40.230 [37224] DEBUG - * Scanning L:\Movies

May 16, 2020 15:05:40.231 [37224] DEBUG - Scanner: Processing directory L:\Movies (parent: no)

May 16, 2020 15:05:40.232 [37224] DEBUG - File ‘L:\Movies\Sweet Home Alabama-1.m4v’ didn’t exist, can’t skip.

May 16, 2020 15:05:40.234 [37224] DEBUG - Looking for path match for [L:\Movies\The Original Kings of Comedy (2000).mkv]

May 16, 2020 15:05:40.234 [37224] DEBUG - Skipping hash check, no size match for 3674749859 bytes.

May 16, 2020 15:05:40.234 [37224] DEBUG - No match for hash.

May 16, 2020 15:05:40.235 [37224] DEBUG - Downloading document htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.235 [37224] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.236 [37224] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.238 [37224] DEBUG - Downloading document htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.238 [37224] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.240 [37224] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.240 [37224] DEBUG - Added new metadata item (The Original Kings of Comedy) with ID 16040

May 16, 2020 15:05:40.242 [37224] DEBUG - HTTP requesting PUT htp://127.0.0.1:32400/activities/4e2ba0b4-3a82-42d7-88e3-99b2aa2c7dd6?percentComplete=%2B99

May 16, 2020 15:05:40.243 [4716] DEBUG - Matching ‘The Original Kings of Comedy’ (ID 16040) with agent com.plexapp.agents.imdb

May 16, 2020 15:05:40.243 [4716] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/library/metadata/16040/matches?agent=com.plexapp.agents.imdb&language=en&manual=0

May 16, 2020 15:05:40.243 [31720] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=16040&metadataType=1&state=2&metadataState=matching

May 16, 2020 15:05:40.244 [37224] DEBUG - HTTP 200 response from PUT htp://127.0.0.1:32400/activities/4e2ba0b4-3a82-42d7-88e3-99b2aa2c7dd6?percentComplete=%2B99

May 16, 2020 15:05:40.244 [37224] DEBUG - HTTP requesting PUT htp://127.0.0.1:32400/activities/4e2ba0b4-3a82-42d7-88e3-99b2aa2c7dd6?percentComplete=99.000000

May 16, 2020 15:05:40.245 [31720] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/:/metadata/notify/changeItemState?librarySectionID=1&metadataItemID=16040&metadataType=1&state=2&metadataState=matching

May 16, 2020 15:05:40.245 [31720] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/:/metadata/notify/create?librarySectionID=1&ids=16040&types=1

May 16, 2020 15:05:40.245 [37224] DEBUG - HTTP 200 response from PUT htp://127.0.0.1:32400/activities/4e2ba0b4-3a82-42d7-88e3-99b2aa2c7dd6?percentComplete=99.000000

May 16, 2020 15:05:40.246 [37224] DEBUG - Removing 22 media items that were left.

May 16, 2020 15:05:40.246 [37224] DEBUG - Deleting media item 1.

May 16, 2020 15:05:40.247 [37224] DEBUG - Downloading document htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.247 [37224] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.247 [31720] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/:/metadata/notify/create?librarySectionID=1&ids=16040&types=1

May 16, 2020 15:05:40.248 [37224] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.249 [37224] DEBUG - Was connected to metadata item 1, count is now 0.

May 16, 2020 15:05:40.249 [37224] DEBUG - Destroying metadata item 1 (Sweet Home Alabama)

May 16, 2020 15:05:40.249 [37224] DEBUG - Deleting media item 67.

May 16, 2020 15:05:40.250 [37224] DEBUG - Downloading document htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.250 [37224] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.252 [37224] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.252 [37224] DEBUG - Was connected to metadata item 67, count is now 2.

May 16, 2020 15:05:40.253 [37224] DEBUG - Updating deletion state for metadata item 67, is has a dead item count of 0.

May 16, 2020 15:05:40.253 [37224] DEBUG - Deleting media item 68.

May 16, 2020 15:05:40.253 [31720] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/:/metadata/notify/changeItemState?librarySectionID=-1&metadataItemID=67&metadataType=12&state=3&metadataState=loading

May 16, 2020 15:05:40.253 [37224] DEBUG - Downloading document htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.254 [37224] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.254 [31720] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/:/metadata/notify/changeItemState?librarySectionID=-1&metadataItemID=67&metadataType=12&state=3&metadataState=loading

May 16, 2020 15:05:40.254 [31720] DEBUG - HTTP requesting GET htp://127.0.0.1:32400/:/metadata/notify/changeItemState?librarySectionID=-1&metadataItemID=67&metadataType=12&state=5&metadataState=idle

May 16, 2020 15:05:40.256 [37224] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/library/changestamp

May 16, 2020 15:05:40.256 [37224] DEBUG - Was connected to metadata item 67, count is now 1.

May 16, 2020 15:05:40.256 [31720] DEBUG - HTTP 200 response from GET htp://127.0.0.1:32400/:/metadata/notify/changeItemState?librarySectionID=-1&metadataItemID=67&metadataType=12&state=5&metadataState=idle

May 16, 2020 15:05:40.257 [37224] DEBUG - Updating deletion state for metadata item 67, is has a dead item count of 0.

May 16, 2020 15:05:40.257 [37224] DEBUG - Deleting media item 69.

The beginning is the scan of L:\Movies which I assume was when I told it scan libraries after adding my last movie.

Then it looks like there is some kind of problem finding Sweet Home Alabama, which was the first movie I ever added. I assume this means the library scan goes sequentially through the sqlDB in the order they were added? Just a guess, so maybe not.

Then it looks like it does some checks I don’t really understand, then gets the metadata for The Original Kings of Comedy, the last thing I added. I would have expected it to do this, since this was the first scan since I added it.

Then I see a GET Request that seems to be updating that the metadata for The Original Kings of Comedy was a match. Immediately after that I see:

Removing 22 media items that were left.

Then it proceeds to delete items, alternating between media and associated metadata, it seems. It carries on like that for quite a while.

I may be misunderstanding what I am trying to read here. I am very new. But, it seems to me as a noob that somehow the scan DID trigger the delete. Please explain what is really going on here and if it was something I did! I want to be able to use Plex, but can’t imagine fixing this over and over.

Logs Backup.7z (4.5 MB)

Note: The weird htp:// is an edit to allow me to upload without all the links.

Edited to correct to “trigger the delete” from “trigger the scan”.

Huh. What do you mean local disk versus library?

Nope. That is the scanner log. Those messages about adding, removing, deleting are only related to the queue of files to process. The scanner does not remove the actual files. That is done by PMS so you would need to check PMS logs for “delete” to see if files are being removed.

Are there other people in your home that have access to your Plex devices? With that setting enabled, they could be accidentally deleting these items thinking they were just removing it from being shown on the screen of that device.

While chkdsk was running, file explorer showed my disk in the tree as:

Local Disk (L:)

It returned to normal when chckdsk was done, so I assume when it is taken offline it defaults to that. Now shows:

Library (L:)

My kids were in the room with me watching live tv over fire TV on plex when this happened, I was intermittently checking playback on my phone and pc a little earlier, and my husband was outside in the garden. That seems to jive with what I see in the logs as far as I can tell.

One thing worth noting…the hard drive that contained the files was a Segate external hard that I disassembled and installed in the pc. I assumed people that said they had problems on external drive had compatibility issues between PCs. Is there an actual known problem with a fix linked with the actual device firmware or something, with a known fix?

In the meantime, I am going to make a live Ubuntu drive and boot into it. I have had luck recovering a friend’s files by just looking at the drive in a different os, so I will try that.

Yeah. No luck there.

I’m still not clear. Can you maybe provide a screenshot of what you see. If you are looking in file explorer, the words in front of the drive letter is the name you gave the drive. For example, my C: where I have the OS installed I’ve called “Windows”. So it appears as “Windows (C:)”.

image

Edit - That name should not change. If it is something odd is going on.

Are you sure it is not normal behavior? I could run another offline check disk to duplicate to be sure, but I assumed it did that because it was offline. The proper display name returned as soon as the drive was back online. Remember. I did a chkdsk /r, not /f.

I guess I should say locked, not offline. I think disk management showed “online” the entire time.

I’ve never seen the name change, but if it is, that’s something Windows is doing. PMS doesn’t care about the name, only the drive letter. So as long as that doesn’t change, it shouldn’t affect PMS.

If checkdisk is somehow locking the drive, that would make it inaccessible to PMS. PMS should not be modifying files if a drive is inaccessible. Your scanner logs from before showed no issues with PMS seeing your media files so I don’t think that’s the issue.

The files getting deleted would be mentioned in your server logs. You’ll need to provide those if you want me to look.

I didn’t think the name label change was related, once I realized it went back to normal after the chkdsk finished.

Was there something missing from the .7z I attached? I thought all the logs were in the same directory.

Ah sorry. Forgot you had included the logs earlier.

I checked and there is no mention of PMS deleting your files. It’s possible something else removed the files, which then triggered PMS to remove them from your library when you did the scan so it appeared that PMS delete the files.

Or PMS did delete the files, but it happened before the sequence of logs that you provided, so we still can’t tell what happened. If you are able to recreate this, I’d be happy to look at new logs. But for now, I still can’t tell if PMS did this or not.

I appreciate your help. For now, I turned off the allow delete type settings, as well as empty trash so I can see if something is deleted very easily. I also set up a File History for my libraries. It is a ton of extra storage, but it should be hard to lose anything. If I see this happen again I will try to catch the logs right away so we can figure it out.