Is it possible to move server metadata to another location?

The easiest will be modifying the  /etc/default/plexmediaserver file and specifying the location.

Stop Plex

First thing you will need to do is to stop Plex Media Server

			<div style="margin:0px;font-size:14px;">
			<div style="margin:0px;color:rgb(170,170,170);text-align:right;">1</div>
			</div>
		
		
			<div style="color:rgb(0,0,0);margin:0px;font-size:14px;">
			<div style="color:rgb(99,100,103);margin:0px;"><span style="color:rgb(0,111,224);">/</span><span style="color:rgb(0,45,122);">etc</span><span style="color:rgb(0,111,224);">/</span><span style="color:rgb(0,45,122);">init</span><span style="color:#008080;">.d</span><span style="color:rgb(0,111,224);">/</span><span style="color:#008080;">plexmediaserver </span><span style="color:rgb(0,45,122);">stop</span></div>
			</div>
		
	</div>

 

Make sure all Plex services are killed

Next run this command to make sure all Plex services are killed and no longer running

			<div style="margin:0px;font-size:14px;">
			<div style="margin:0px;color:rgb(170,170,170);text-align:right;">1</div>
			</div>
		
		
			<div style="color:rgb(0,0,0);margin:0px;font-size:14px;">
			<div style="color:rgb(99,100,103);margin:0px;"><span style="color:rgb(0,45,122);">killall</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(0,111,224);">-</span><span style="color:rgb(0,0,0);">u</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(0,45,122);">plex</span></div>
			</div>
		
	</div>

 

Copy Metadata and Index Data to new location

Now copy all of the current meta and index data to the new location, this may take a while depending on the size. This is assuming that Plex data is stored at “/var/lib/plexmediaserver/Library/Application Support” which is the default for Debian based Plex Media Server installs. This command below should copy the Application Support directory to the /new/dir/to/plex, ultimately making it “/new/dir/to/plex/Application Support”

			<div style="margin:0px;font-size:14px;">
			<div style="margin:0px;color:rgb(170,170,170);text-align:right;">1</div>
			</div>
		
		
			<div style="color:rgb(0,0,0);margin:0px;font-size:14px;">
			<div style="color:rgb(99,100,103);margin:0px;"><span style="font-weight:bold;color:rgb(0,0,0);">cp</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(0,111,224);">-</span><span style="color:rgb(0,0,0);">rf</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(221,17,68);">'/var/lib/plexmediaserver/Library/Application Support'</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(0,111,224);">/</span><span style="font-weight:bold;color:rgb(0,0,0);">new</span><span style="color:rgb(0,111,224);">/</span><span style="color:rgb(0,45,122);">dir</span><span style="color:rgb(0,111,224);">/</span><span style="font-weight:bold;color:rgb(0,0,0);">to</span><span style="color:rgb(0,111,224);">/</span><span style="color:rgb(0,45,122);">plex</span><span style="color:rgb(0,111,224);">/</span></div>
			</div>
		
	</div>

 

Move old directory to .OLD in case of issues

Now we will move the old directory to .OLD in case we need to restore it if there are any issues

			<div style="margin:0px;font-size:14px;">
			<div style="margin:0px;color:rgb(170,170,170);text-align:right;">1</div>
			</div>
		
		
			<div style="color:rgb(0,0,0);margin:0px;font-size:14px;">
			<div style="color:rgb(99,100,103);margin:0px;"><span style="font-weight:bold;color:rgb(0,0,0);">mv</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(221,17,68);">'/var/lib/plexmediaserver/Library/Application Support'</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(221,17,68);">'/var/lib/plexmediaserver/Library/Application Support.OLD'</span></div>
			</div>
		
	</div>

 

Create symbolic link to new directory

Next we will create a symbolic link to the new location for our meta and index data

			<div style="margin:0px;font-size:14px;">
			<div style="margin:0px;color:rgb(170,170,170);text-align:right;">1</div>
			</div>
		
		
			<div style="color:rgb(0,0,0);margin:0px;font-size:14px;">
			<div style="color:rgb(99,100,103);margin:0px;"><span style="font-weight:bold;color:rgb(0,0,0);">ln</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(0,111,224);">-</span><span style="color:rgb(0,0,0);">s</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(221,17,68);">'/new/dir/to/plex/Application Support'</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(221,17,68);">'/var/lib/plexmediaserver/Library/Application Support'</span></div>
			</div>
		
	</div>

 

Change owner of new location to Plex

We now have to update the permissions and change the owner to Plex otherwise there will be issues

 
 
 
 
 
Shell
			<div style="margin:0px;font-size:14px;">
			<div style="margin:0px;color:rgb(170,170,170);text-align:right;">1</div>
			</div>
		
		
			<div style="color:rgb(0,0,0);margin:0px;font-size:14px;">
			<div style="color:rgb(99,100,103);margin:0px;"><span style="font-weight:bold;color:rgb(0,0,0);">chown</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(0,111,224);">-</span><span style="color:rgb(0,0,0);">R</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(0,45,122);">plex</span><span style="color:#008080;">.plex</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(221,17,68);">'/var/lib/plexmediaserver/Library/Application Support'</span></div>
			</div>
		
	</div>

 

Start Plex Media Server

Next we will start Plex Media Server to make sure everything worked correctly. After issuing the command below, login to Plex via http://ipofserver:32400/manage and make sure everything is still the same and working correctly.

 
 
 
 
 
Shell
			<div style="margin:0px;font-size:14px;">
			<div style="margin:0px;color:rgb(170,170,170);text-align:right;">1</div>
			</div>
		
		
			<div style="color:rgb(0,0,0);margin:0px;font-size:14px;">
			<div style="color:rgb(99,100,103);margin:0px;"><span style="color:rgb(0,111,224);">/</span><span style="color:rgb(0,45,122);">etc</span><span style="color:rgb(0,111,224);">/</span><span style="color:rgb(0,45,122);">init</span><span style="color:#008080;">.d</span><span style="color:rgb(0,111,224);">/</span><span style="color:#008080;">plexmediaserver </span><span style="color:rgb(0,45,122);">start</span></div>
			</div>
		
	</div>

 

Remove old Meta and Index Data files

As long as everything works correctly, you can now remove the old directory we renamed in case of any issues.

			<div style="margin:0px;font-size:14px;">
			<div style="margin:0px;color:rgb(170,170,170);text-align:right;">1</div>
			</div>
		
		
			<div style="color:rgb(0,0,0);margin:0px;font-size:14px;">
			<div style="color:rgb(99,100,103);margin:0px;"><span style="font-weight:bold;color:rgb(0,0,0);">rm</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(0,111,224);">-</span><span style="color:rgb(0,0,0);">rf</span><span style="color:rgb(0,111,224);"> </span><span style="color:rgb(221,17,68);">'/var/lib/plexmediaserver/Library/Application Support.OLD'</span></div>
			</div>
		
	</div>

Voila, you have now moved your Meta and Index data to a new location, profit!

https://smyl.es/how-to-move-plex-metadata-and-index-data-to-new-driver-andor-directory-location/