Location of Library Path Configuration

Server Version#: Windows 2016
PMS Version#: Plex Media Server 1.16.5.1488

I am looking to tear down and rebuild a Plex Media Server on Windows so that when I restore the backed up configurations, everything just works without having to re-add the libraries. I backed up everything in C:\Users<user>\AppData\Local\Plex Media Server and the “HKEY_CURRENT_USER\Software\Plex, Inc.\Plex Media Server” registry keys, but when I restore those, I still have to manually add the library path when I re-install PMS. One caveat to this whole setup is that it’s on a local network only and doesn’t have internet access. Basically, I’m using it for some testing.

Sturmie

The location of library path configuration is stored in the database.

I’ve done some backup/restores before and never had an issue. In fact. I use a special database(empty with 1 library labeled “PLEX DOWN”) when I want to inform my friends/family on maintenance.

You are restoring with the exact same library paths, right? Same drive letters as before?

1 Like

Very important when doing the backup copy: shut down the server. Otherwise your copy of the main database file will most likely be corrupt. Which then leads to the creation of a new, empty database with no content = no libraries.

The location of the Plex data folder is stored in the registry on Windows.

https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/

If the key is missing, it means that the data folder is still at the default location.

https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/

Sorry, I had family in town over the weekend and couldn’t reply. Yes, same paths on the old and new installs.

Here were my steps after I had the original PMS up and running with a library set up:

  1. Shut down PMS

  2. Backed up the entire “C:\Users<user>\AppData\Local\Plex Media Server” directory

  3. Backed up “HKEY_CURRENT_USER\Software\Plex, Inc.\Plex Media Server” registry keys

  4. Fired up a fresh VM with the same OS and same local user account

  5. Installed the same version of PMS on the new VM, shut down PMS

  6. Copied over the media files to the same library path

  7. Copied over the same files from Steps 2 and 3

  8. Started up PMS on the new VM

All of the settings I changed in my original setup were there (like allowing unauthenticated access from a certain IP range, disable emptying trash, etc.), just not the library.

Yeah, those are the articles I used to do the backup. I still have a snapshot of the original VM, so I can give it another shot. Basically, a few coworkers and I are trying to learn how to automate a COTS (commercial-off-the-shelf) app in GCP (our company’s preferred public cloud provider). We wanted something that wasn’t “easy” and didn’t want to use Kubernetes/Docker because we wanted to automate each step ourselves so that we can learn as we go. We’re all Plex users at home and figured it would be a good app to work with since PMS has a Windows (which we’re all more familiar with) and Linux version.

If no library is there, it is very likely that the main database file has been damaged during the copy. Restore one of the earlier backups and try again.

https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

Possible reasons for the damage:

  • either the server was not shut down at the time of the backup
  • the plex data folder was located on a network share, instead of la local drive
  • the drive was running full

I tried again to shut down PMS, make a backup of the necessary files and everything worked this time…was able to restore EVERYTHING from that back up now. Thanks!

Sturmie

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