# Database appears to be beyond repair

**URL:** https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378
**Category:** Plex Media Server
**Tags:** server-windows
**Created:** [August 14, 2021, 4:23pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378 "2021-08-14T16:23:04Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 14, 2021, 4:23pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/1 "2021-08-14T16:23:04Z")

</div>

Server Version#: 1.23.4.4712  
Player Version#: 4.63.0

Having a problem that I cannot resolve. I am running PMS v1.23.4.4712 on Windows Server. Thursday night it decided it didn’t want to work anymore. I am getting the following error:  
“Plex Media Server unable to open its media database”

I did a repair of the database, didn’t make any difference. I then tried restoring one of my 4 backups and none of those are working either. I am at the point now where Plex runs and I can see my home screen with images but nothing will open. All of my libraries are greyed out with Yellow triangles with ! inside.

What are my options with this? I need to get this up and running. I tried deleting the following files and allowing Plex to regenerate everything figured that is how I would begin a new database but wasn’t certain.

com.plexapp.plugins.library.db  
com.plexapp.plugins.library.blobs.db  
com.plexapp.plugins.library.blobs.db-shm  
com.plexapp.plugins.library.blobs.db-wal  
com.plexapp.plugins.library.db-shm  
com.plexapp.plugins.library.db-wal

Thanks

Larry

---

<div class="post-metadata">

### Author: ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)
#### Post date: [August 14, 2021, 4:56pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/2 "2021-08-14T16:56:29Z")

</div>

What behavior do you see if you rename `%LOCALAPPDATA%\Plex Media Server\` to something else (don’t delete it, just rename it)? Do this with the Plex Media Server stopped; you’ll also need to stop the Plex Update Service in the Windows Services app.

When you restart Plex Media Server after doing this, it should behave like a brand new, already-claimed server, but with no libraries. It should have created a new `%LOCALAPPDATA%\Plex Media Server\` folder. Create a library test that the server is functioning properly.

You can undo all of this by deleting or renaming the new folder and restoring the old one.

All that said, you may not need to give up on your old Plex data yet. You didn’t say which older database you restored. Did you try your oldest one? If that one’s corrupt and can’t be repaired, then you may indeed need to start over. Just ensure you’re following [these instructions](https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/) to the letter when trying your older database(s).

Note:

- This assumes you haven’t moved your [Plex data folder](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/) (`%LOCALAPPDATA%\Plex Media Server\`) to somewhere else already. If so, rename whatever folder you’re data’s actually located in.
- Start the Plex Updater Service once you’re finished.

---

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 14, 2021, 9:06pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/3 "2021-08-14T21:06:26Z")

</div>

I can’t do what you are suggesting. I have my %LOCALAPPDATA%\Plex Media Server\ located at P:\Plex Media Server as I wanted it on it’s own drive. I built this 7+ yrs ago and can’t recall how I pointed it at a different location, I think it gets done within Plex itself but since I can no longer access it I can’t redirect it somewhere else so I tried something below, which didn’t work anyway.

The Plex Updater Service is configured to point there as well. I renamed the Plex Media Server folder to \_old and created a new folder with the basic plex info in there, plex won’t stay running for whatever reason. It closes immediately.

I have never run into anything this bad before and am totally stumped. ☹

---

<div class="post-metadata">

### Author: ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)
#### Post date: [August 14, 2021, 9:30pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/4 "2021-08-14T21:30:15Z")

</div>

> [@spdrcr5](#):
>
> I think it gets done within Plex itself but since I can no longer access it I can’t redirect it somewhere else so I tried something below, which didn’t work anyway.

The option to configure the Plex data directory location from within the Plex interface was removed, for security purposes. It can still be done manually using the procedure here:

> [@\[HowTo\] An extended guide on how to move the Plex data folder on Windows](https://forums.plex.tv/t/howto-an-extended-guide-on-how-to-move-the-plex-data-folder-on-windows/197060):
>
> By default, Plex server stores all its own data on the system drive, in the AppData path of the Windows user. You might want to change that location, if your system drive is a small SSD or you are simply having capacity issues. Moving Plex data to a dedicated drive also makes it easier to retain your Plex server data when changing machines or re-installing Windows from scratch. For larger servers/collections, I recommend a dedicated, internal SSD drive. Exit/End/Quit/Close plex, using the t…

> [@spdrcr5](#):
>
> I renamed the Plex Media Server folder to \_old and created a new folder with the basic plex info in there, plex won’t stay running for whatever reason. It closes immediately.

Check inside `P:\Plex Media Server\` to see if there’s another `Plex Media Server` folder; if so, rename _that_ one and leave the top-level one as-is.

---

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 14, 2021, 9:55pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/5 "2021-08-14T21:55:22Z")

</div>

I made one change that the post suggested, I moved the P:\Plex Media Server into P:\Plex\Plex Media Server. I still cannot get plex to run, can’t get the Plex Update Service to run either. ☹

I made all of the registry changes and still the service won’t start even after a server reboot. hmmm

---

<div class="post-metadata">

### Author: ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)
#### Post date: [August 14, 2021, 10:29pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/6 "2021-08-14T22:29:48Z")

</div>

I didn’t explain that last point very clearly; not at all, actually.

Wherever you point your Plex data directory to, the server itself will expect a `Plex Media Server` directory to exist (or it will create it). For example, on my own system I have it pointed to `C:\Users\myusername\PlexData\`. Inside that directory, Plex automatically created `Plex Media Server`. Step 5 of the forum post I linked explains this.

So, in your example, you should have a directory structure which looks something like this:

```auto
P:\
    Plex\ <--- Your registry's LocalAppDataPath should point here
        Plex Media Server\ <--- Not here
            Cache\
            Codecs\
            ...
            Plug-in Support\
            ...

```

So check your `Plex Media Server` directory. Does it contain a sub-directory of the same name? Or maybe just screenshot the directory structure an post it here.

---

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 15, 2021, 3:59am UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/7 "2021-08-15T03:59:26Z")

</div>

No, it does not contain another directory within itself.

P:\Plex\Plex Media Server\Cache\

---

<div class="post-metadata">

### Author: ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)
#### Post date: [August 15, 2021, 5:31am UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/8 "2021-08-15T05:31:23Z")

</div>

That’s good then, as long as you have `LocalAppDataPath` pointed to `P:\Plex\`.

If that still doesn’t work, then you may want to try removing the `LocalAppDataPath` registry key altogether as a test; then it will use its default path.

---

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 15, 2021, 2:02pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/9 "2021-08-15T14:02:46Z")

</div>

I will try that as a test as my C: drive is a mirrored SSD which is why I moved it to a standalone P: drive.

---

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 15, 2021, 6:13pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/10 "2021-08-15T18:13:57Z")

</div>

This is what I have attempted. I deleted the 2 registry entries that were pointing LocalAppDataPath to P:\Plex. I then copied the plex files into appdata\local\Plex Media Server and attempted to start Plex. It didn’t start. First attempt stated it couldn’t find the database so I copied one of the databases into the correct location and that error went away but still didn’t start.

I am at the point where I might just have to start over again. ☹ What is the best way to do that? Is it possible to save anything from the previous installation such as images/content as well as what has been watched, progress, etc?

Thanks for your help. At this point I need to get this up and running before family kills me. lol

---

<div class="post-metadata">

### Author: ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)
#### Post date: [August 15, 2021, 6:40pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/11 "2021-08-15T18:40:58Z")

</div>

> [@spdrcr5](#):
>
> What is the best way to do that?

You can use [this procedure](https://support.plex.tv/articles/201941078-uninstall-plex-media-server/) to uninstall Plex Media Server completely.

Where it tells you to delete the server’s local app data, don’t; just back it up somewhere for safekeeping.

After completing that procedure, just [install the latest Plex Media Server as a new installation](https://support.plex.tv/articles/200288586-installation/).

Once you’ve reinstalled Plex Media Server, claimed it, and satisfied yourself that everything is working as it should be, try backing up the _new_ data and moving the old data back (with the repaired/backup database?) and see what happens. (Hopefully it goes without saying that all this data-swapping I’ve been suggesting should take place with PMS stopped 😉 ). You can always move your new, pristine data back if it doesn’t work.

However… Based on what you’ve described to this point, you don’t have a salvageable database, either a via backup or repair. All the interesting things which you are attempting to save are stored there (except certain file-based metadata). If you haven’t got a good database, you’re going to have to start over, unfortunately.

---

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 15, 2021, 8:31pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/12 "2021-08-15T20:31:33Z")

</div>

Really appreciate everything you have suggested. Going to attempt the clean installation into a totally different directory on the P: drive and see how it goes. Will update you either way.

thanks again!

Larry

---

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 15, 2021, 11:06pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/13 "2021-08-15T23:06:56Z")

</div>

I have reinstalled into P:\Plex\Plex Media Server and have added back 4 libraries. They are being built which could take an hour or so as I have quite a bit of media. Once this is done I will attempt to play something but so far I am seeing things being built which is great!

After I confirm this is working I will backup this new database to a new location and try copying one of my previous databases and see how that works. Assuming that works, what else do I copy over so as to restore the previously watched, etc content or is that all stored within the database itself if that is crap then I am out of luck?

Thanks!

---

<div class="post-metadata">

### Author: ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)
#### Post date: [August 15, 2021, 11:17pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/14 "2021-08-15T23:17:00Z")

</div>

Dependent upon how hosed your old database is, this article may helpful:  
[https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/](https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/)

That one’s just for view states and ratings; this one describes how to move an entire installation to a new system, which is essentially what’s happening here. However, if you do this, ignore the registry steps since you’ve already blown away your old install.

[https://support.plex.tv/articles/201370363-move-an-install-to-another-system/](https://support.plex.tv/articles/201370363-move-an-install-to-another-system/)

When doing any of this, I’d recommend stashing you _entire_ new [Plex data folder](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/) somewhere safe so that you can at least get back to a working system easily should something go wrong.

> [@spdrcr5](#):
>
> Thanks!

No problem, and good luck!

---

<div class="post-metadata">

### Author: ![spdrcr5](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@spdrcr5](https://forums.plex.tv/u/spdrcr5)
#### Post date: [August 17, 2021, 1:28pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/15 "2021-08-17T13:28:46Z")

</div>

I wanted to give you an update on where my server stands and what I discovered.

I am operational 100% on my original database! After I installed Plex to a totally new directory and a fresh database I added 4 libraries as a test and it worked perfectly. I then my old database into there and it worked without any issues. I then relocated Plex to P:\Plex using the new database to confirm it worked and it did without a hitch. I then copied the old database into there and confirmed it too worked without any issues.

It really seems that the entire issue wasn’t a database corruption but was actually a Plex corruption somewhere. Very odd as I don’t recall every reading about Plex corrupting, it is always the database that gets hosed.

Thanks again for all of your help with this. Very much appreciated.

Larry

---

<div class="post-metadata">

### Author: ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)
#### Post date: [August 17, 2021, 4:11pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/16 "2021-08-17T16:11:21Z")

</div>

> [@spdrcr5](#):
>
> Thanks again for all of your help with this. Very much appreciated.

You’re welcome, glad you were able to recover it!

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [November 15, 2021, 4:11pm UTC](https://forums.plex.tv/t/database-appears-to-be-beyond-repair/736378/17 "2021-11-15T16:11:44Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
