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.
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?
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.
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:
Shut down PMS
Backed up the entire “C:\Users<user>\AppData\Local\Plex Media Server” directory
Backed up “HKEY_CURRENT_USER\Software\Plex, Inc.\Plex Media Server” registry keys
Fired up a fresh VM with the same OS and same local user account
Installed the same version of PMS on the new VM, shut down PMS
Copied over the media files to the same library path
Copied over the same files from Steps 2 and 3
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.
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!