Move Library to External Drive without losing meta data

I am running out of Hard Drive space so I wish to move my Plex Library to a 3T external drive.   In many cases I have added my own posters, dates, descriptions and can not afford to lose all that.  (Among other things I have many Beatles Live Concerts that are not in the usual database).

 

I have found several descriptions of how to do this but they all give different steps and they don't explain some of the steps in terms that I understand.

 

Shouldn't this be REALLY simple?   I mean, people must need to do this all the time.   What if you are buying a new computer?   What if your library outgrows it's current drive etc etc?

 

Can any one point me to the current correct method?

 

Thanks

[Move Media Content to a New Location](https://support.plex.tv/hc/en-us/articles/201154537-Move-Media-Content-to-a-New-Location)

What specifically do you wish to move?

Do you wish to move the Plex installation  or the media  or both?

As ChuckL noted, there are basically (to make it simple!) two locations of data:

1 - Plex installation where all the posters, metadata, user added URLs and cover images and of course the Plex database of all your libraries and media

2 - Media where all your stuff is located, your videos, music, photos etc.

Usually you run out of space for your Media, so you can then use the link provided above by astrofisher to move your all or some of your stuff to a new larger storage pool.

TT

I'm not sure I understand what distinction people are making.   As I said in my first post I have run out of hard drive space and want to move my media to a an external drive but not lose my posters, and other data that I have input myself.

I'm not moving to a new computer.  Just freeing up my internal hard drive.

I'll check out the link.

Thanks

There is a distinction between the data Plex uses to operate (it's internal database inclusive of all the metadata, posters, etc) and your actual media (audio, video, and photo files).

Since one is Plex 'internals' (in the 'Library' or 'data directory') and the other is 'media', there are two procedures.     This is why we ask.

Therefore, here are both procedures.    You can decide which one, or if both, apply to you.

1.  This procedure is for moving your media, without losing any of the time spent downloading the metadata.  https://support.plex.tv/hc/en-us/articles/201154537-Move-Media-Content-to-a-New-Location

2.  These commands are for Linux systems (you will have a variation for your Windows system) and will move the Plex data directory ('Library') to a new location.   It is the simplified form of Move an Install to Another System – Plex

Perform the following as 'root'

a. shut down plex
b. mkdir /new-plex-data-directory ; chown plex.plex /new-plex-data-directory
c. cd /var/lib/plexmediaserver 
d. tar cf - ./Library | (cd /new-plex-data-directory ; tar xf -)
e. mv Library Library-orig
f. ln -s /new-plex-data-directory/Library .
g. start plex

After confirming the move is successful, delete "Library-orig".

1 Like

thanks for the info, I might have to do the same soon as my drive is almost full.

Chuck L, I am attempting what you call have as procedure 1)

I successfully did the first few steps but I'm confused by this part:

Edit Your Libraries

 
In order to update the content location for your media, you'll need to Edit a Library and then add the appropriate folder for where your content is now located. Leave the existing/previous folder location in there for now.
You'll need to do this for each of your Libraries, but you should probably complete the process for one at a time.
Related Page: Plex Media Server > Libraries > Editing Libraries
Update the Library
 
After adding the new content folder, an update for the Library will probably start. If not, simply do an Update Library.
The Server will examine the contents of the new location and associate the content with the existing media items in your Library.

What is meant by "edit the library and then add the appropriate folder"?

It seems to me they must actually mean "push the edit button and then choose folders and add the appropriate folder"?

In order to test the procedure I just tried it on one of my libraries.   I added the appropriate folder and then Plex updated and showed a number 2 in the corner of each Poster.   At this time I could play the videos and they worked.  

But then I renamed the old folder and updated the library and the videos then didn't work.

I had to go into edit AGAIN and choose Folders and remove the old folder location.   Then it updated one more time and the videos work and the number 2 in the corner of each Posters is gone.

Can you clarify this?   Is the correct procedure 1)  edit/folder add the new location 2) update the location with both locations in place 3)  Rename or delete the old location 4) Update the library 5) edit/folder remove the old location 6)  Update the library?

You had almost completed the process successfully.   Had you simply followed through, it would be done.   Not to fear, it's easy to continue and finish it.

You are correct  to 'Edit the library' means exactly that.  Hover over the edit pencil for the library and click it;  go to the 'Folders' tab;  Add the new folders/directories.

You will see the number '2' in the upper right corner.  This shows that Plex now sees the same movie in two places;  the old (which hasn't been cleared out yet) and the new (which it just found and cross referenced into the existing metadata)

The error you saw when attempting to play the movie after renaming the folder is because you got slightly out of sync.  Plex was still looking for the 1st copy before looking for the 2nd copy.

After adding the new location,  which puts the '2' (instance count) in the corner of each poster, when refresh/update is complete, go back to the same library and remove the old folder (so it is no longer referenced) then refresh/update the library one last time.

What this does is remove the '2' (the reference to the old location) from the database.

After this is complete, you can empty trash/clean bundles as well.   Now all references to the old media location are gone and everything will work as before.

Here is another way of doing the same thing.

1.  disable / turn off  "empty trash after library update" (if this is enabled) in Settings > Server > Library

2.  make the new media location available to the computer

3.  edit (add) the new folder location to the library

4.  copy the media to the new location

5.  refresh/update the library (which will cause the '2' to appear)

6.  edit (remove) the first folder location from the library

7.  refresh/update one last time

8.  verify all media correctly accounted for.

9.  empty trash / clean bundles

10. delete the original copy of the media (the old location)

ChuckL, thanks for your patience and your clear answers.   Are emptying trash and clearing bundles the same thing or two different steps?   What is/are the purpose?   Does it just make more room or does it speed things up or what?

Emptying the trash and Cleaning the bundles are indeed two separate operations.

Emptying the trash takes information (references) which are marked for deletion and takes them out of the database.

Cleaning the bundles removes the rest of the Plex information (instance information) which was created as directories and files (poster art, etc) and deletes it also.

If you empty the trash without cleaning the bundles, Plex can reuse the information if a new match is found prior to complete deletion.

To create an analogy, using Windows terms,

1.  Update/Refresh    will 'select' (like you do in windows explorer when you are about to delete) and put it in the trash.

2.  Empty Trash   does exactly that, it empties the trash can.

3.  Cleaning the bundles does the equivalent of going out to the disk, where the file(s) were stored, and deleting anything which referenced the now deleted content.

It is also like emptying a browser cache and then deleting the history, obliterating all traces.

By not having these unused entries in the database, searches are faster.   Disk space is reclaimed.

My Databse is EMPTY AGAIN!!! WTF!!!

I did EXACTLY what this Links says

https://support.plex.tv/hc/en-us/articles/201154537-Move-Media-Content-to-a-New-Location

When i restart my Plex Server and open Plex-Web, NO LIBRARIES are there! >>> un-LOL

Any Hints with this???

Using the latest Plex-Server on unRAID (0.9.12.1)

Upgrading a Hard Drive

If you're simply upgrading to a new/larger hard drive, the easiest thing to do is to name the new location exactly the same as the original one. That means simply making sure the new hard drive is named exactly the same as the old one, and that the media files are in the same location.

The general procedure is outlined below. For this example, we'll assume that your content is currently on a hard drive named MyMediaDrive.

  1. Quit/exit your Plex Media Server
  2. Re-name the old hard drive to a different name (e.g. OriginalMediaDrive)
  3. Name the new hard drive to the exact same name as the original drive (i.e. MyMediaDrive)
  4. Copy the content from the old drive to the new drive, making sure that the content ends up in the same relative location
  5. Start the Plex Media Server

If you've done things correctly, your Server won't even know that anything has changed and your content will work right away.

THIS IS "NOT" WORKING!!!

Plex filled up my SSD so I’ve succesfully moved my Plex metadata (posters, data,…) and media files (series & movies) to my new external hard drive of 2TB. Did it twice and the server is still working.
This is a 10-step solution for moving your complete Plex server without losing media & metadata.

  1. Stop the Plex server.
  2. Type in Run or CMD: %LOCALAPPDATA%\Plex Media Server\
  3. This folder contains all metadata of your server. It can be more than 5GB big.
  4. Move everything of that folder (or zip & extract) to a new folder “Plex” on your drive
  5. Move all your media files to your new drive (Be sure to organize, ex. TV Shows in separate folders)
  6. Start the Plex server. Don’t scan yet.
  7. Chance a few advanced settings in Plex: (click show advanced)
  8. Go to general settings and chance the path from “C:\users*\Appdata\Plex Media server” to “E:\Plex”
    Essentially you let Plex know that you’ve moved it’s data to a new folder. In my case the folder is on my E:\ drive.
  9. Edit your libraries. Don’t delete them, just edit the folder location. This folder location is my case “E:\TV Shows”
    10.~~ Clean bundles~~ and do a full rescan.

I’ve tried to explain this in the simplest way. If you follow my steps and you encounter a problem, I might not be able to help. It worked twice for me, but I’m not sure if it will work for everyone.

Don’t touch the metadata folder if it’s lower than 5GB, it’s not worth moving then.
It doesn’t really matter where you put your files, you only need to let Plex know of the new location.
The Plex installation itself stays in Program Files (x86), otherwise we need to chance some registry settings.

Hope this helps.
Jento

@zonediver said:
My Databse is EMPTY AGAIN!!! WTF!!!

I did EXACTLY what this Links says

That’s strange, maybe Plex data (and not just plex movies) are on the same drive, did you copy over to the new drive both plex data AND movies? AFAIK the new drive need to have the same name and drive letter as the older one, otherwise direct path to libraries will not work. Nonetheless you should see the libraries with all the files “non available”

@Jento said:
8. Go to general settings and chance the path from “C:\users*\Appdata\Plex Media server” to “E:\Plex\Plex Media Server”

No. If you type in E:\Plex\Plex Media Server there, plex will start with an empty library, because it will create a new folder structure in E:\Plex\Plex Media Server\Plex Media Server
Notice the double \Plex Media Server ?

The field must contain E:\Plex\ and not more.

@OttoKerner said: Notice the double \Plex Media Server ? The field must contain E:\Plex\ and not more.
I noticed it, thanks for the heads up

@jento I’m trying to do the same thing on my mac (move the plex library (metadata, cache folder, etc) from my HD to my Media Drive), but I cant find the path settings you’ve referenced.

I’ve gone to Settings/Server/General (Advanced)/ but theres no change path settings for the library.

Am I looking in the wrong place?

@hossain7426 said:
I’ve gone to Settings/Server/General (Advanced)/ but theres no change path settings for the library.

This menu entry only exists in the Windows version.
I understand on Mac and Linux you need to use a “symbolic link” instead.

1 Like

@OttoKerner - Thanks!

I don’t understand why Plex would exclude macs from having such a simple and sometimes necessary option?!

I followed steps in https://support.plex.tv/articles/201154537-move-media-content-to-a-new-location/

But when I added new location to the library (with old location preserved) plex library is updating and downloading new metadata anyway.
What am I doing wrong?