Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

SSD and Plex how can I move database ?

curiositycuriosity Posts: 2Members
G'day,

Question I have is for those of us that us Solid State Drives, how do we move the plex database to another location is there a config file that we can edit to move it..

Searched the forum without any real clues as to where Plex hides its path config files..

I have a solution atm that is working but its more a global change than for just Plex.

Its easy enough to tell windows to move the "user" folder and program files/program files (x86) or if you want to the programdata folder to another drive which will take care of space issues for those that use SSD's and the relieve your SSD of uneccessary read/writes.

You might ask well then I have fixed my issue of database location (well not really) because of the huge amount of files and folders that Plex makes it boggs the system down whenever you initiate a search for a file (takes a while for anything to search through the plex files) and Virus checks again a virus checker will sit there forever just going through the Plex folder.

I would like to move the Plex database to either a Nas storage device or some other drive and simply exclude it from future searches or virus checking.

I would have thought that there was a preferences setting somewhere - where I could just point please dump database/change location to here - I can't see it or am I mistaken.

It would make life much more pleasant..

Regards and thanks for any info in advance.
«13

Comments

  • mfeingolmfeingol Director of Engineering Posts: 5,016Members, Plex Employee, Plex Pass Plex Employee
  • curiositycuriosity Posts: 2Members
    mfeingol wrote:


    Unfortunately that seems to be a reg hack where the boys seem to be having issues with it working properly.

    I think my solution is a better one more complete and it works without any issues.

    I'm just surprised that no where on this forum or in the wiki there is a "look for this file" set your preferred directory and path for install, I wonder why there is no option for the database install path, the coders must realise that their database can be huge and it would be "ok" to move it somewhere else.


    Thanks for your reply and attempt.

    Cheers..
  • mfeingolmfeingol Director of Engineering Posts: 5,016Members, Plex Employee, Plex Pass Plex Employee
    curiosity:

    This is the current official solution for people who don't want the PMS user files on their system disk. It's not a "reg hack"; it's a fully supported PMS feature, and it works quite well.
  • PlexnixPlexnix Posts: 2Members
    edited March 2012
    An alternative method (which I use and works fine) is to use a symbolic link ( http://en.wikipedia.org/wiki/Symbolic_link ) to link from Plex's folder to a folder on another drive.
    For windows the description is here: http://en.wikipedia.org/wiki/NTFS_symbolic_link
    You can use that to link network paths too so you should be able to link it to a NAS.

    Summary instructions:
    stop plex from running
    locate your plex appdata folder (this is the large one with thousands of files in it) - probably in c:\users\[username]\appdata\local\plex media server
    - copy its path
    rename your plex appdata folder (so you can make a link there)
    open a command prompt window as administrator
    use the command: mklink /D [path-to-plex-appdata] [path-to-new-location]

    It should then say symbolic link created in the command window and there should be a folder created which links to the alternative directory.
    Then you can copy your plex files back into there and start plex again and it should work!
  • bengt_abengt_a Posts: 18Members, Plex Pass Plex Pass
    Plexnix wrote:

    An alternative method (which I use and works fine) is to use a symbolic link ( http://en.wikipedia.org/wiki/Symbolic_link ) to link from Plex's folder to a folder on another drive.
    For windows the description is here: http://en.wikipedia.org/wiki/NTFS_symbolic_link
    You can use that to link network paths too so you should be able to link it to a NAS.

    Summary instructions:
    stop plex from running
    locate your plex appdata folder (this is the large one with thousands of files in it) - probably in c:\users\[username]\appdata\local\plex media server
    - copy its path
    rename your plex appdata folder (so you can make a link there)
    open a command prompt window as administrator
    use the command: mklink /D [path-to-plex-appdata] [path-to-new-location]

    It should then say symbolic link created in the command window and there should be a folder created which links to the alternative directory.
    Then you can copy your plex files back into there and start plex again and it should work!


    Amazing solution! Thanks so much for this very simple idea, Plexnix!!! It works great!

    Here's how I did it. (Same way as Plexnix, only with different words...)

    1) Stop Plex Media Server from running by right clicking on the Plex icon in the Taskbar and choose Exit
    2) Locate the Plex Appdata folder. In Windows 7, it is located under C:\Users\<yourusername>\Appdata\Local\
    3) Move the Plex Media Server directory to the place you want it. E.g. G:\
    (This can take a while)
    4) Open a command prompt window (Win+R and type "cmd")
    5) Type: mklink /D "C:\Users\<yourusername>\Appdata\Local\Plex Media Server" "G:\Plex Media Server"
    6) Start Plex Media Server
    Done!
  • mfeingolmfeingol Director of Engineering Posts: 5,016Members, Plex Employee, Plex Pass Plex Employee
    Using symbolic links or junctions is a fine approach as well. The only caveat is that not every version of Windows supports these mechanisms. E.g. XP doesn't support symlinks, and IIRC junctions are only usable between different volumes. This is why we added the PMS-specific configuration mechanism.
  • rprabu1984rprabu1984 Posts: 2Members, Plex Pass
    it worked like cake... thanks
  • MxChrisMxChris Posts: 1Members
    Just what I was looking for and it worked perfectly, thanks!
  • convasconvas Posts: 1,818Members, Plex Pass Plex Pass
    Hi,
    Not sure which method you used but now you can easily change the location using the new web interface.
  • crowly100crowly100 Posts: 28Members, Plex Pass Plex Pass
    convas wrote:

    Hi,
    Not sure which method you used but now you can easily change the location using the new web interface.

    How do you do this? I can't find the appdata folder I bought a new windows 8 machine and would like to move over all my edits and collections.
  • rick151rick151 Posts: 6Members, Plex Pass
    After doing the link technique, when I go to start Plex, I get a pop up window saying that "Plex Media Server has stopped working". It doesn't do anything else except goes directly to this popup. I'm running Win7.
    Can anyone give me a little guidance?

    Here is the problem details I receive. I also attached a pdf copy[attachment=15300:Error.pdf]
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: Plex Media Server.exe
    Application Version: 0.9.7.12
    Application Timestamp: 510768ef
    Fault Module Name: MSVCR100.dll
    Fault Module Version: 10.0.40219.325
    Fault Module Timestamp: 4df2be1e
    Exception Code: 40000015
    Exception Offset: 0008d6fd
    OS Version: 6.1.7601.2.1.0.256.48
    Locale ID: 1033
    Additional Information 1: 3c70
    Additional Information 2: 3c705d17ff260425ee675e9df7665a51
    Additional Information 3: e402
    Additional Information 4: e4026c158b48068180aa3852ed3abc41

    Read our privacy statement online:
    http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

    If the online privacy statement is not available, please read our privacy statement offline:
    C:\Windows\system32\en-US\erofflps.txt
  • AinukeAinuke Posts: 58Members, Plex Pass Plex Pass
    crowly100 wrote on December 1 2012, 11:41 PM: »

    How do you do this? I can't find the appdata folder I bought a new windows 8 machine and would like to move over all my edits and collections.

    Not sure where AppData is located in Win8 (I'm on 7), but this should tell:

    Make sure you're on current PMS version (9.7.12) and open Media Manager > settings > general and click "show advanced settings".

    Second field down is the current location of AppData.

    You may have to show hidden files/folders in explorer to navigate to it.

    Move your AppData PMS folder to a new location, then go back into Media Manager window and alter the path to reflect the new location.

    Done. 

    No registry hacks, no symbolic links.

    Very awesome that the devs included this in the current release!

  • AinukeAinuke Posts: 58Members, Plex Pass Plex Pass

    @Rick151:

    The syntax for making symbolic links can be tricky. It's most likely that there's a flaw in the new path to your AppData. If you can't get a better answer, you're probably best off uninstalling, deleting the symbolic links, then reinstalling PMS.

    Then use the Media Manager Web Interface to alter your AppData path as in my previous post.

    Peace

  • blindguyblindguy Posts: 25Members, Plex Pass Plex Pass
    Ainuke wrote on March 6 2013, 4:38 AM: »

    @Rick151:

    Then use the Media Manager Web Interface to alter your AppData path as in my previous post.

    When I log into the interface, I see the following choices:

        General
        myPlex
        Agents
        Library
        Channels
        Network
        Transcoder
        Languages
        DLNA
        Network Discovery
     

    When I go to general, and check off advanced and all I get are more options for logging.  Any assistance is appreciated.

  • AinukeAinuke Posts: 58Members, Plex Pass Plex Pass
    @blindguy:
    Verify you are on PMS version 9.7.12 on Windows.
  • blindguyblindguy Posts: 25Members, Plex Pass Plex Pass
    Ainuke wrote on March 12 2013, 4:32 PM: »

    @blindguy:
    Verify you are on PMS version 9.7.12 on Windows.

    Nope, Debian Linux OS, Plex Version 0.9.7.14

  • AinukeAinuke Posts: 58Members, Plex Pass Plex Pass
    @blindguy:
    Sorry.
    This is the Windows PMS board; I assumed.
    I have no experience w/Linux.
  • blindguyblindguy Posts: 25Members, Plex Pass Plex Pass
    Ainuke wrote on March 12 2013, 5:22 PM: »

    @blindguy:
    Sorry.
    This is the Windows PMS board; I assumed.
    I have no experience w/Linux.

    No worries, thanks for attempting.  I was hopeing it was a settign on all versions and not just Windows.

  • MrHistamineMrHistamine Posts: 37Members

    I think, since this thread was originally created, they've made moving the directory a bit easier (as I didn't have to do any registry hacking or linking).  To move the server's directory to an alternate location:

    Note:  As an example, I'm using a folder named "PlexMS", that I'm placing at the root of my D: drive.  Just replace my references, with whatever drive letter you're targeting, as well as, whatever folder name you plan to use.

    PSA:  Always perform periodic backups of your hard drives.

    1. Create the "PlexMS" folder on the D: drive.
    2. Open the Plex media manager by right-clicking on the PMS tray icon, and selecting Media Manager...
    3. Click the settings icon (1), then click Show Advanced Settings (2), and change the location in the text field, to the address to the "PlexMS" folder (3), and click the orange Save button:plex_move_app_data_change_settings.png
    4. Close the browser page, and shutdown PMS by right-clicking the tray icon, and selecting Exit.
    5. Copy the "Plex Media Server" folder from the "C:\Users\[USER_NAME]\AppData\Local" directory, to the "PlexMS" folder you created earlier.  This may take anywhere from a few seconds, to a few minutes, depending on how much media Plex has processed prior to you moving the folder:plex_move_app_data_copy_folder.png
    6. Restart PMS, then head back into the media manager; ensure all your app data was moved successfully.  If it was, you can delete the old "Plex Media Server" folder.
  • AntiJohnnyAntiJohnny Posts: 102Members, Plex Pass Plex Pass
    edited March 2013

    i did this and i got the error below, and PLEX crashes: (by "this" i mean the steps MrHisamine posted)

    Mar 18, 2013 10:25:54:511 [4376] INFO - Plex Media Server v0.9.7.17-1f0b170
    Mar 18, 2013 10:25:54:526 [4376] DEBUG - Opening 10 database sessions to library, SQLite 3.7.15.2, threadsafe=1
    Mar 18, 2013 10:25:54:526 [4376] ERROR - SQLITE3:31e8e594, 14, os_win.c:33915: (123) winOpen(\\\Server\share\PLEX\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db) - The filename, directory name, or volume label syntax is incorrect.
    Mar 18, 2013 10:25:54:542 [4376] ERROR - SQLITE3:31e8e594, 14, os_win.c:33915: (123) winOpen(\\\Server\share\PLEX\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db) - The filename, directory name, or volume label syntax is incorrect.
    Mar 18, 2013 10:25:54:542 [4376] ERROR - SQLITE3:31e8e594, 14, cannot open file at line 33921 of [c0e09560d2]
     
    I renamed the Databases folder and got the same issue:
     
    Mar 18, 2013 10:27:35:604 [2924] INFO - Plex Media Server v0.9.7.17-1f0b170
    Mar 18, 2013 10:27:35:604 [2924] DEBUG - Opening 10 database sessions to library, SQLite 3.7.15.2, threadsafe=1
    Mar 18, 2013 10:27:35:620 [2924] DEBUG - Installing Library Database from [C:\Program Files\Plex\Plex Media Server\Resources\com.plexapp.plugins.library.db] to [\\Server\share\PLEX\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db]
    Mar 18, 2013 10:27:35:776 [2924] ERROR - SQLITE3:291b9573, 14, os_win.c:33915: (123) winOpen(\\\Server\share\PLEX\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db) - The filename, directory name, or volume label syntax is incorrect.
    Mar 18, 2013 10:27:35:776 [2924] ERROR - SQLITE3:291b9573, 14, os_win.c:33915: (123) winOpen(\\\Server\share\PLEX\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db) - The filename, directory name, or volume label syntax is incorrect.
    Mar 18, 2013 10:27:35:776 [2924] ERROR - SQLITE3:291b9573, 14, cannot open file at line 33921 of [c0e09560d2]
     
     
     
    I verified permissions are correct. Also, the path is correct except for the extra "\" at the beginning.( winOpen(\\\Server\share\... )
     
    I also changed the actual name of my server path to "Server\share" in this post.

    Any Ideas?

«13
Sign In or Register to comment.