Move library location without re-fetching metadata?

I posted the same question over at the Mac forum for Plex Server (since that’s what I’m running), but since the problem isn’t really platform specific I thought I’d post it here too:

I followed the guide here to move my Plex library location (different drive and different path): https://support.plex.tv/hc/en-us/articles/201154537-Move-Media-Content-to-a-New-Location

What I’d like to avoid is the re-fetching of metadata that messed up my custom modifications of some TV series. I simply want to keep all the metadata intact, but move the library. There should be a way to do this, right?

Was thinking about creating symbolic links or if there’s some string (i.e. the path to the library folder) in the Plex database that could be altered so the metadata fetching doesn’t have to occur?

I’m not sure how it’s done in the Mac world, but I just helped the devs finish the implementation of the Linux ‘service override’ (override.conf) which allows you to specify any of Plex’s variables. This is the desired method. That failing, use of mount --bind /olddir /newdir also makes it transparent to plex. Symlinks are acceptable as 3rd choice.

From the Linux perspective…

cd /var/lib/plexmediaserver; sudo ln -s /real/library/location ./Library

The goal is to create things such that your changes are 100% transparent or, as with the case of override.conf, fully supported by the OS and invisible to plex.

If you are daring and like to live dangerously, you can also move your files then follow the instructions in the marked answer in this thread, https://forums.plex.tv/discussion/197812/plex-database-modification-moving-media-the-right-wrong-way.

Edit - Just to be clear, editing your database can corrupt the database. Only do this if you feel really comfortable.

Thanks for your replies, guys!

@ChuckPa
Should be pretty similar in the Mac world as of Linux, but I don’t seem to have anything on

cd /var/lib/plexmediaserver

since I get:

-bash: cd: /var/lib/plexmediaserver: No such file or directory

@MovieFan.Plex
Thanks! I’m trying that method out. I just don’t know how/where to execute those commands.

I’m running ”DB Browser for SQLite” now and I’ve tried to use the ”Execute SQL” tab to run the changes on my database, but I get:

no such module: fts4: UPDATE metadata_items

Any ideas? Should I do things differently?
Thanks!

Am away from home and without computer but remember something on the mac about a Library directory under your home directory.

If true, ~/Library/Application Support/Plex Media Server or ~plex/Library/Applcation Support/Plex Media Server should be what you’re looking for.

cd ~plex should take you to PMS’s home directory. This is the key. On Linux, PMS’s home directory is /var/lib/plexmediaserver.

Once you’ve found PMS’s home directory, then you can proceed as I’ve shown with

tar cfz /some/place/to/save/PMSLibrary.tgz ./Library

@ChuckPa
Hmm… Thanks for trying, but I think we have a misunderstanding here. When I say I want to ”move the Library” I mean my media shown in Plex (movies, tv shows, pictures and music), nothing else. :slight_smile:

Are we talking about the same thing?

Okay, I finally managed to do it by altering the paths in the database as per this post (as suggested by @MovieFan.Plex): https://forums.plex.tv/discussion/comment/1080551/#Comment_1080551

@MovieFan.Plex said:
If you are daring and like to live dangerously, you can also move your files then follow the instructions in the marked answer in this thread, https://forums.plex.tv/discussion/197812/plex-database-modification-moving-media-the-right-wrong-way.

Edit - Just to be clear, editing your database can corrupt the database. Only do this if you feel really comfortable.

Any chance of getting this kind of data to back up to the cloud (or let us do it ourselves via a tool inside the server), so that we could move from one OS and machine to another more easily? Eventually I want to move from Mac to nVidia Shield for my server, but can’t imagine losing all of my playlists I’ve created and whatnot…

Not sure how backing up to a cloud would hep as the problem is with local paths changing. A tool to do this would be useful but I have no info on if something like this is planned. You can always make a feature request.