How to Migrate to a New Server
When you set up your Plex server chances are you will eventually want to move that server to a new system.
The steps for migrating to a new Plex server are the same for every operating system. The steps involved in setting up a new server are:
- Setting up the new server with Plex.
- Copying over the Plex settings and data from the old server.
- Connecting the media to the new server.
- Starting Plex on the new server.
There are some nuances in each step, so the next few sections will step through the process of migrating your Plex server to a new server.
1. Preparing the new Plex server
The first step in moving your Plex server to a new server is to first set up the new server. The following sections will outline the steps involved in setting up the new server.
i. Install Plex Media Server
The first step is to install Plex Media Server on the new system that will host Plex.
You would install it just as you did on your current system if the operating system is the same.
ii. Sign out of the new server.
Once Plex is installed, you want to sign out of Plex on the new server by doing the following:
- Click your profile in the top-right corner of the Plex Web App and then click the Sign Out option.
iii. Stop Plex Media Server
Before Plex can be transferred to the new server, you should stop the Plex process that is running on the new server.
Stopping the process will ensure no files are in use when the files from the current server are copied. Files that are in use could cause files to be locked when trying to do the copy.
2. Copy the Plex data
Once the new server has been set up and Plex installed, you can now begin to copy over the Plex data from the current server to the new server.
i. Disable empty trash automatically
If you have Plex automatically empty the trash when media is deleted, disable this setting.
To disable this setting, do the following:
- Open a Web browser and navigate to your Plex server.
- Log into your Plex server with an administrator account.
- Click the Settings icon - the wrench - in the upper-right corner of the Plex server page.
- On the left menu, click the Library option under the Settings section.
- Uncheck the Empty trash automatically after every scan option.
- Click the Save Changes button at the bottom of the page to save your changes.
The main reason to disable this setting is to prevent the new server from automatically removing all data for your media if the new server can't find the media files when it is first started.
ii. Stop the Plex Media Server
Before moving any of the Plex data to the new server, you should stop Plex Media Server on the current server. This will ensure that no files are in use when you copy the files to the new server.
iii. Export the Plex settings
The Plex Media Server settings - the values shown in the Plex Web App under the Settings option - are stored in either a file on the server or in the registry for Windows.
I recommend you copy the Plex settings to the Plex data directory. This will make it easy to copy all your Plex data to the new server if everything is in one directory.
iv. Copy the Plex data directory
Most of the Plex data - including metadata and databases - are located in the Plex data directory.
This directory location will be different for each operating system. You can find the location of the data directory with the article Where is the Plex Data Directory Location?.
You will need to copy the contents of the above directory to your new server in the same location.
To reduce the time it takes to copy the files to the new server, you can exclude the following directories:
- Cache
- Crash Reports
- Diagnostics
- Logs
- Updates
There are many ways to copy files from one computer to another, so I'll leave it up to you to decide what works best for you. Just make sure you copy the files in the same location on the new server as the current server.
3. Finish the server move
The final steps in the process will happen on the new server. If you haven't, ensure you log into the new server with the user that will be running Plex, and that all files from the old Plex server have been copied to the correct folder.
At this point, Plex Media Server should not be running.
i. Restore the Plex settings
Once all the files have been copied over to the new server, including the Plex settings. If the Plex settings are in a file, copy the file to the correct location - overwrite any file that currently exists.
For Windows, merge the registry file in the registry to overwrite any settings that have been created when Plex Media Server was installed.
ii. Make your media available
Now that the Plex files and settings have been moved to the new server, you will need to make your media files available to the new server.
The steps for this are dependent on how you store our media files:
- Internal or external hard drive.
- If your files are one or more external hard drives, connect the hard drives to your new server, and then assign those drives the same drive letters that they had on the old server. This should require no additional work to have Plex find your media files.
- NAS
- For connection to a NAS share, simply connect to the NAS share exactly as you did with the old server. Use the same drive letter to connect to the NAS as you did on your old server.
- Using different storage devices or different drive letters
- If you decide to also change storage devices or drive letters for your new server, then you will need to do some additional steps as outlined below.
ii. Start the Plex Media Server
Now that all the Plex data files and settings have been copied to the Plex server, and the media files made available, it is time to start the new server.
At this point, all your Plex settings and data will be available in Plex. If you connected your media storage in the same way as you did on your old server, Plex should be able to find the media without any issues.
If you have to change media storage devices, or drive letters, you can have Plex find your media again, by editing each library on your Plex server and then add the new location for the media files.
Once the new paths have been added to each library, you will need to perform a scan for each library. This will cause Plex to now search the new library locations for your media.
Once all your libraries have the correct media files, and you have verified everything is working, then you can remove any of the old paths from the libraries.
4. Final maintenance
For some final cleanup, you can re-enable the Empty trash automatically after every scan option if you previously disabled it.
You can also run the Empty Trash option on the new server.
Running the Clean Bundles option will clean up any leftover media bundles that are no longer needed.
Finally, you should optimize the Plex database.
Your new Plex server should now be up and running in the same way your older server was running.
If you find an issue with this guide, or some steps weren't clear, feel free to contact me.