How to move Plex metadata and index data to new drive/partition and/or directory location
The most recent versions of the Plex Media Server has the option to auto index, depending on your library size, this can take up a lot of space, and in some instances you may need to have this saved in a different location. You may also have a very large media collection, and the metadata could be very large in size too. Well, I recently had this issue and between metadata and index data I had almost 55GB of a 64GB Solid State Drive used just for Plex metadata and index data! Here’s how I moved all of that data to a new location and did it without making any changes to the configuration…
Update 3/3/2014: Check the comments below for additional methods to change the directory, but the easiest will be modifying the /etc/default/plexmediaserver file and specifying the location.
Just to note, my current setup is using OMV (Open Media Vault) that runs Debian, but this should be the same for almost any version of linux, including Ubuntu, etc. The very simple approach I took to make this change was by using a symlink, and a few other small changes.
Stop Plex
First thing you will need to do is to stop Plex Media Server
1 |
/etc/init.d/plexmediaserver stop |
Make sure all Plex services are killed
Next run this command to make sure all Plex services are killed and no longer running
1 |
killall -u plex |
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”
1 |
cp -rf '/var/lib/plexmediaserver/Library/Application Support' /new/dir/to/plex/ |
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
1 |
mv '/var/lib/plexmediaserver/Library/Application Support' '/var/lib/plexmediaserver/Library/Application Support.OLD' |
Create symbolic link to new directory
Next we will create a symbolic link to the new location for our meta and index data
1 |
ln -s '/new/dir/to/plex/Application Support' '/var/lib/plexmediaserver/Library/Application Support' |
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
1 |
chown -R plex.plex '/var/lib/plexmediaserver/Library/Application Support' |
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.
1 |
/etc/init.d/plexmediaserver start |
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.
1 |
rm -rf '/var/lib/plexmediaserver/Library/Application Support.OLD' |
Voila, you have now moved your Meta and Index data to a new location, profit!
-
Just Facts
-
hpcodecraft
-
Maycon
-
Thomas Gerritsen
-
-
-
VinBob
-
Vikingen94
-
Justin Drentlaw
-
Victor Manuel
-
Scott
-
Scott
-
-
Scott
-
Jason
-
Scott
-
Jason
-
Scott
-
Jason
-
-
-
-
-
Chanse Arrington
-
Nathaniel Gates
-
Joe Huss
-
Ashish Maheshwari
-
-
Ashish Maheshwari
-
Bob Jameson
-
Myles
-
Bob Jameson
-
Scott
-
-
-
-
Tom T
-
Myles
-
Man Of Lard
-
Myles
-
-
-
Myles
-
Tom T
-
-
draxen
-
Myles
-
-
Ryan Mendieta
-
Myles McNamara
-