Search

smyles tools

GetWebsiteIP.com

Recent GitHub Activity

@tripflex tripflex starred platformatic/platformatic · March 10, 2023 13:54
platformatic/platformatic

Platformatic Open Source monorepo!

JavaScript 865 Updated Mar 22

@tripflex tripflex commented on Automattic/WP-Job-Manager#2370 · March 3, 2023 21:37
@tripflex tripflex commented Mar 3, 2023

https://gist.github.com/tripflex/7f4a10fb27c7e8c95c86010f93ac250b Yup been an issue for a while also seems to depend on the theme as well

@tripflex tripflex commented on Automattic/WP-Job-Manager#2343 · March 3, 2023 03:33
@tripflex tripflex commented Mar 3, 2023

You can also use the visibility addon to do this as well

@tripflex tripflex commented on Automattic/WP-Job-Manager#2355 · March 3, 2023 03:30
@tripflex tripflex commented Mar 3, 2023

I think I misunderstood your question with my first reply, you need to use a filter to add these: WP-Job-Manager/wp-job-manager-template.php L…

@tripflex tripflex commented on Automattic/WP-Job-Manager#2365 · March 3, 2023 03:27
@tripflex tripflex commented Mar 3, 2023

Radius is not a native feature. Are you using my plugin or some other theme that adds this feature?

Featured Downloads

  • WHMCS Affiliate Coupons Addon Module (3224 downloads)
  • Windows Update Agent for Windows XP x86 (3681 downloads)
  • iSpy Open Source CCTV Software (4796 downloads)
  • Samsung Galaxy III (S3) GT-I9300 SDCard Head (74010 downloads)
  • Genymotion ARM Translation (10082 downloads)

Recent Comments

PressRelease.cc

Wow, exceptional and complete

keshav gaur

What if the target machine requries port?

Just Facts

One snag with the docker install of plex. For

Popular Posts

Ubuntu End of Life Package Repository
21 Jul , 2014

How to fix Ubuntu/Debian apt-get 404 Not Found Package Repository Errors (Saucy, Raring, Quantal, Oneiric, Natty…)

Ajenti V
14 Feb , 2014

How to setup a WordPress PHP site with Nginx, PHP5-FPM, and MySQL using Ajenti V with working Permalinks

Plex Media Server
18 Nov , 2013

How to move Plex metadata and index data to new drive/partition and/or directory location

Bunch of Flash Drives
28 Mar , 2013

Tutorial How to build the Ultimate Bootable Custom USB Flash Drive with Multiple ISOs for Windows, Linux, Etc, and PortableApps for Windows Desktop.

D-Link Boxee Box
05 Dec , 2013

How to obtain root, install and run XBMC on D-Link Boxee Box

16 Oct , 2012

Samsung Galaxy III (S3) GT-I9300 JTAG Leaked Document. How to repair soft bricked Galaxy S3.

Git’n Busy

  • Github
  • GitTip

Tags

Android apache apt-get backup bash Container cPanel Database debian DNS Download email Errors files footer ftp Git install jQuery linux mac Mail MySQL node open source OpenVZ output php Plex plugin Popup proxmox Remove s3 script server ssh suphp Ubuntu Unmount Update upgrade whmcs Windows wordpress
Code and Tech Junkie
  • Menu
  • About
  • Plugins
  • Downloads
  • Contact
  • Github
  • GitTip

How to move Plex metadata and index data to new drive/partition and/or directory location

18 Nov , 2013 35 Comments Standard Post
Plex Media Server

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

Shell
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

Shell
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”

Shell
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

Shell
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

Shell
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

Shell
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.

Shell
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.

Shell
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!

#debian #index data #linux #linux move plex database #metadata #migrate plex database #move plex metadata folder linux #moved directory in linux for plex #no metadata plex media #Plex #plex clean up large metadata #plex copy metadat to new server #plex copy metadata #plex file not available mac drive partition #plex media server #plex media server edit metadata #plex move database linux #plex remove meta data #plex save metadata #save plex library #symlink #Ubuntu
Share

Myles

Orlando, FL

Did this post help you?

Give back and rate it for me!

Related Posts

22 Dec , 2017

Setting ArduinoJson value from C++ STL Containers (std::vector, std::array, etc)

CloudFlare EasyApache4 Problems
07 Nov , 2017

CloudFlare mod_cloudflare WHM EasyApache4 CloudLinux Cannot load modules/mod_cloudflare.so

WordPress Login Form wp-login.php
19 Jan , 2017

How to block wp-login.php brute logins with cPanel, mod security, and ConfigServer Firewall

16 Dec , 2016

How to fix Mac OSX stuck/hanging on progress bar after login

  • Just Facts

    One snag with the docker install of plex. For the link to resolve you need to add a volume for it to the docker configuration. The annoying thing is that it has to be added as the same destination used in the link. So I have to map the actual path into my container. This solution is not so good for a docker installation.

  • hpcodecraft

    I just tried this on a Raspberry Pi 3, where I wanted to move the Plex data to an USB stick to avoid clogging the SD card. I also ran into the problem that Plex crashed no matter what I tried. I doesn’t seem to like symlinks or folders outside its home. Also I didn’t want to edit all the scripts to make it work.
    My solution in the end was to copy the contents of /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/ to my USB stick, delete them from the folder and mount the USB stick directly into this folder. Plex now runs again and has plenty of space to save metadata.

    • Maycon

      Could you teach me step by step how you did it? I need to do this a lot and I have not yet found a solution that works.

      • Thomas Gerritsen

        You can use “Disks” to edit the mount point of the USB/SSD and point it directly to “/var/lib/plexmediaserver/Library/Application Support” then unmount and remount. this will make it work. Make sure to have all that in the Application Support folder directly in the root of the drive you are mounting.

  • VinBob

    Hello All – I am looking for something similar on the Mac platform as I need to move the Plex Media Server folder from my boot drive to another internal drive as its now 55GB in size. Can anyone kindly point me in the right direction? Thanks in advance!

  • Vikingen94

    Hi just wanted to post the solution to an error I encountered, when I tried to start plex again it gave me error code 134 (when I checked service plexmediaserver status). It was caused by the new directory not having the right rights (it only changed the symlinks permitions), so double check that if you get that error 🙂

  • Justin Drentlaw

    Thank you so much, this was very helpful for me!

  • Victor Manuel

    Just modify the symlink location to get it working:

    In the post is written:
    ln -s ‘/new/dir/to/plex/Application Support’ ‘/var/lib/plexmediaserver/Library/Application Support’

    But the correct place to store the simbolic link is:

    ln -s ‘/new/dir/to/plex/Application Support’ ‘/var/lib/plexmediaserver/Library’

  • Scott

    My current setup is Ubuntu 12.04 storing Application Support information on a local Hard Drive. I am trying to migrate to a Ubuntu 14.04 system on a VM with a small hard drive partition (16GB):

    Here’s what I have done so far:

    1.) I copied the entire Application Support folder (from my Ubuntu 12.04 server to my Drobo 5N.

    The drobo is mounted on both systems.

    2.) I created a symlink to Application Support on the 14.04 system. “/var/lib/plexmediaserver/Library/Application Support” and I chown it to plex.plex but I noticed that on the next startup of plex, it now starts creating a new database at “/home/username/Library/Application Support”

    3.) I then renamed the “/home/username/Library/Application Support” to have a .OLD at the end too and created a second symlink to my drobo at that location.

    Now, when I do a sudo service plexmediaserver start it says it is running, but nothing happens (If I open the browser I get a 404) but if I do a /usr/sbin/start_pms it opens and everything “looks like it is working”. Now when I say that, it has all the settings, and the media folders added, but there is nothing in them, it is link it’s unable to see any of the metadata folders.

    Has anyone successfully been able to symlink to a NAS? If so, do you have any insight for me?

    I have also tried editing the /etc/default/plexmediaserver file, but I have the same issue.

    Thanks

    • Scott

      Still not working, what I did was delete the Application Support folder on my drobo and left the symlinks in to see if plex would build a new database, but when I start plex I get:

      Error: Unable to set up server: sqlite3_statement_backend::loadOne: database is locked

      I think this is maybe what Bob Jameson (below) was describing?

  • Scott

    My setup is Ubuntu 14.04 on a VM with a small hard drive partition (16GB):

    I copied the entire Application Support folder (from my old plex server running on Ubuntu 12.xx) to my Drobo.

    The drobo is mounted on both systems and I created a symlink to Application Support on the 14.04 system. I have tried editing the /etc/default/plexmediaserver folder to the proper name in quotes without the in it and without (it doesn’t seem to matter).

    when I do an ls on Ubuntu 14.04 it shows the folder in Cyan, this makes me think the symlink is working, so I added all my media folders to plex and went to bed. Today I woke up to no hard drive space on the 14.04 system, and when I use baobab it should all the data is in the Metadata folder under Application support… So I removed the symlink and the data is still there!?

    Can anyone please explain to me what is happening? why:

    A.) The symlink is not working,
    B.) After I delete the folder (Application Support) somehow it is still using space…?

    Thanks

  • Jason

    I grew frustrated, unable to make this work running PMS 0.9.11.7 on Ubuntu 14.04. Like others, I was rapidly running out of room on my small SSD.

    I followed the instructions above, and also made edits to /etc/default/plexmediaserver AND /usr/sbin/start_pms. I also changed the plex user /home directory to my new desired location. Still couldn’t get the plex server to start.

    Finally, I simply did ‘apt-get remove’ and re-downloaded/installed Plex. Done! Now it works, and everything is stored in my new directory, off the SSD.

    • Scott

      after you did the apt-get remove and install, did yo need to edit the /etc/default/pleaxmediaserver and /usr/sbin/start_pms files again or did it just work?

      thanks

      • Jason

        Just worked; I must have borked something unintentionally when moving those files around. Been a month since and no problems — might just be a placebo effect, but the server actually seems to run a little faster now.

        • Scott

          Did you move your files to a separate drive connected via SATA? I am looking at doing this onto a Drobo, and hoping it will work…

          • Jason

            Can’t speak to moving them to a NAS myself — files are now living on a different drive in the same box. Good luck!

  • Chanse Arrington

    I’m not sure what I did wrong, but this didn’t work for me.

    I got the files to copy over, but couldn’t get plex to see the files once they were moved.

    Ended up deleting the library and starting over under the new location.

    Changed the storage location by nano editing etc/default/plexmediaserver

  • Nathaniel Gates

    Thank you sir. I was continually running out of space on my boot drive. i modified your directions a bit and moved the entire plexmedaserver folder to the larger partition.

    Thanks again for the thourough walkthrough.

  • Joe Huss

    PLEXLOCALAPPDATA

    set it as a system environment variable in windows, or in your /etc/bash.bashrc or /etc/profile in linux , It defaults to something like %AppData%/Local, so if you were moving your data to E:Plex Media Server ,you would set PLEXLOCALAPPDATA to E:

    If you want to see for yourself how it picks, look in these files and search for ‘APPDATA’
    Resources/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py
    Resources/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py
    Resources/Plug-ins/Framework.bundle/Contents/Resources/Versions/1/Python/PMS/Plugin.py
    Resources/Plug-ins/Framework.bundle/Contents/Resources/Versions/0/Python/PMS/Plugin.py

    • Ashish Maheshwari

      I have set the environment variable (PLEXLOCALAPPDATA) in Ubuntu to (/media/ashish/Goodies/Temp) but still it doesn’t work.

      What i am trying to do is use my Window’s PMS metadata for my Ubuntu’s PMS metadata. My Plex Media Server folder (metadata folder) is in (/media/ashish/Goodies/Temp) equivalent to (D:/Goodies/Temp) in windows.

  • Ashish Maheshwari

    I had been using the windows Plex Media Server for a while for which I had stored the metadata in D drive (so that i can reuse it when format my windows). I recently installed Ubuntu 14.04 and am dual booting Windows 7 and ubuntu. Now that i want ubuntu to be my main OS, i installed plex media server on ubuntu and wanted to use the metadata of my windows 7’s plex media server (its 3-4GB of metadata). i followed these steps after installing PMS:

    1. edited the /etc/default/plexmediaserver file and changed the metadata location to
    PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=”/media/ashish/Goodies/Temp/”
    from
    PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=”${HOME}/Library/Application Support”

    2. created symbolic link
    ln -s ‘/media/ashish/Goodies/Temp/’ ‘/var/lib/plexmediaserver/Library/Application Support’

    My PMS opens at http://localhost:32400/web/index.html but i cant see my collection. pls help 😐

  • Bob Jameson

    The problem with 0.9.9.10 version is the plexmediaserver.pid is symlinked to /var/lib/plexmediaserver/Library/Application/Support/Plex Media Server. When the whole directory is moved to a Samba server, for example, the server will throw an error since the symlinked .pid file goes with it. How were you able to fix this? Modify the init.d initialization script? This is in the case of Centos.

    • Myles

      I’ll have to look at it again to be sure, but once thing you should look at is white space expansion. It could be related to Samba, and if you have “Application Support” without quotes, that may be causing a problem.

      Regarding the symlink “technically” it should work, but it all depends on your setup. Did you find a way around it or still looking for one?

      • Bob Jameson

        Sorry, yes it is Application Support without the “/” in between. I can symlinked them well. I think the problem is the chown as it goes to Samba. Plex.plex cannot own what is in Samba so I get access denied permissions. I’m still looking for a solution. If only I can get .pid to stay inside /var/run instead of symlinked to “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server”, I think it will work but I still haven’t figured out how to do it.

        There is also a configuration setting inside Plex under /etc/sysconfig/PlexMediaServer that allows changing the Application Support directory but, likewise, stalls if set-up in a Samba share.

        By the way, I am running it as a guest inside a KVM but I thought is should not make a difference.

        • Scott

          Did you figure out this issue? I think I perhaps have the same issue… When I start_pms, I get:

          Error: Unable to set up server: sqlite3_statement_backend::loadOne: database is locked

          symlinks are to a drobo

  • Tom T

    To be honest neither of these methods seems to be working on Ubuntu. I have tried editing the default file as well as creating a link to the moved files both with the same result, plex crashing as soon as it starts.. Maybe im missing something or maybe its because im trying to move the files to /media/Data/plexmediaserver. Ive made sure that the permissions are set the same on all the directories as well as the own:grp is set to plex:plex.. Any ideas?

    • Myles

      hm, when you say “crash” what do you mean? Is there anything in error logs (Plex Media Server.log)?

      What you can do to further troubleshoot, go to /usr/lib/plexmediaserver/ , in that directory you will find a start.sh file, as well as the Plex Media Server file. You can test by running ‘sh start.sh’ and any errors it show on the screen, you may need to make sure variables are set, you can open the start.sh file to see what required fields need to be set

      • Man Of Lard

        I just did this on Ubuntu and the problem I saw was the escaped space in the defaults file… Leads to a segfault/core dump. As the guide is written it expects to find the metadata in “Application Data” rather than “Application Data”… Simple fix to remove the ” ” from the defaults file and you’re done.

        • Myles

          Yeah I don’t really like the absolute path used for Plex, but I see how that could be an issue. I went ahead and updated the tutorial to use quotes just for the sake of it 🙂 Thanks for the info though!

    • Myles

      There’s also a file to start Plex at /usr/sbin/start_pms …. don’t have time to look through it right now to see the right way to debug with those files, but that should at least give you a starting point. I know that’s how i’ve figured out problems in the past, just can’t remember the exact method used to do so. Maybe here in the next couple days i’ll post a tutorial on troubleshooting..

    • Tom T

      Ok got it working.. TO be honest i used the same procedure and it worked on my production machine. At the time i was using a VM with a ZFS array of 6 disks, Same as production. Im wondering if it was something to do with the VM?? I also moved from Ubuntu 12 to 14 lts.

  • draxen

    You could also change plex user home directory in /etc/passwd from /var/lib/plexmediaserver to a directory of your choosing…

    • Myles

      Good to know, I also figured out that you can specify the directory by configuring the /etc/default/plexmediaserver file as well

  • Ryan Mendieta

    That was awesome, thanks for helping me keep my SSD clean!

    • Myles McNamara

      No problem, that’s exactly why I had to move mine as well! Only way I found out was when it filled up the SSD and locked up Plex … yikes!

expert-button

(C) 2014 Myles McNamara