# Moving folders to SSD, question

**URL:** <https://forums.plex.tv/t/moving-folders-to-ssd-question/717111>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [May 21, 2021, 5:39pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111 "2021-05-21T17:39:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 5:39pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/1 "2021-05-21T17:39:46Z")

</div>

Server Version#: 1.23.1.4528

I’ve installed an SSD to house the Plex database, Metadata and Cache folders, transferred the data over and created symlinks to the new location, and it’s working.

My question is, should I also migrate the “Media/localhost” folder - that’s where all the bundles are stored - or should I have moved the entire “Library/” structure?

I know there’s a forum post on the moving of the whole thing, but I thought I could just move individual folders and symlink them, unless this is bad practice?

Just looking for some clarity from the gurus, thank you for all you do and your thoughts on this matter 🙂

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 21, 2021, 6:13pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/2 "2021-05-21T18:13:34Z")

</div>

If you moved the entire structure,

1. backups would be easier.
2. the database, which is at the heart of what gets displayed on the page, is also on SSD. If the database is slow then everything is slow.

---

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 6:37pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/3 "2021-05-21T18:37:11Z")

</div>

Ack! I forgot to include the “Plug-in Support\Database” folder was also part of the migration, so it’s on the SSD as well. I’ll modify the original post 🙂

_EDIT_ on second check, the database is actually in the original post 😉

---

<div class="post-metadata">

**Author:** ![axemanuk666](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/axemanuk666/32/126759_2.png) [@axemanuk666](https://forums.plex.tv/u/axemanuk666)\
**Post date:** [May 21, 2021, 6:45pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/4 "2021-05-21T18:45:39Z")

</div>

If you have moved the Cache folder, then it is likely the Transcode folder has also been moved ( **Cache\Transcode** ) and if this is on the SSD, you could actually wear out your SSD prematurely.

This has happened to quite a few people.

Unless you already know, the **Cache\Transcode** folder is written to very heavily with potentially thousands of little chunks of vids that are being transcoded, and it is this that could wear the SSD.

The best solution around this, would be to create a RAM Drive and then SymLink the **Cache\Transcode** folder to the RAM Drive.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 21, 2021, 6:48pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/5 "2021-05-21T18:48:36Z")

</div>

Regarding the Transcoder directory,

I recommend setting the directory to use in Settings - Server - Transcoder - Show Advanced.

This way, you can point it to a HDD directory and keep it independent of the SSD

– **WITHOUT SYMLINK MAYHEM** –

---

<div class="post-metadata">

**Author:** ![axemanuk666](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/axemanuk666/32/126759_2.png) [@axemanuk666](https://forums.plex.tv/u/axemanuk666)\
**Post date:** [May 21, 2021, 6:49pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/6 "2021-05-21T18:49:56Z")

</div>

Ah, very good point. Thanks Chuck 😃

---

<div class="post-metadata">

**Author:** ![axemanuk666](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/axemanuk666/32/126759_2.png) [@axemanuk666](https://forums.plex.tv/u/axemanuk666)\
**Post date:** [May 21, 2021, 6:52pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/7 "2021-05-21T18:52:15Z")

</div>

Actually, I’ve just remembered why I did it with a SymLink… Because conversions don’t follow the **Settings \> Transcoder \> Transcoder temporary directory** setting… Well, at least it didn’t a few years back!

---

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 7:16pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/8 "2021-05-21T19:16:48Z")

</div>

My Transcode was already set to /dev/shm (in ram).  
I think that’s the correct way to do it?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 21, 2021, 7:54pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/9 "2021-05-21T19:54:12Z")

</div>

@axemanuk666

If you really want it to be solid,

1. Set the environment variable - Preferred
2. `mount --bind` (hardcore but removes all ambiguity as to where it’s going without symlinks)

Conversions do follow settings. A lot has happened in the past year alone.

---

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 8:42pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/10 "2021-05-21T20:42:03Z")

</div>

Won’t the ENV variable only work if I move the entire /Library folder structure over?  
I’m not sure where to apply mount --bind …

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 21, 2021, 8:54pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/11 "2021-05-21T20:54:49Z")

</div>

Setting PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR **_is_** the preferred method because it moves everything…

What you’re not aware of is that path-relative, symlinks exist in the `Media` and `Metadata` directory trees. If things get to carved up, symlinks won’t be valid.

---

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 8:58pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/12 "2021-05-21T20:58:00Z")

</div>

Oh I see, so definitely I should:

1. Stop PMS
2. Move the contents of “/Library” to the SSD (the whole thing)
3. Set the ENV variable to the new location
4. Start PMS

Do I JUST move everything from “/Library” or should I move ALL of “/var/lib/plexmediaserver”?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 21, 2021, 9:03pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/13 "2021-05-21T21:03:56Z")

</div>

I move the whole thing but only `Library` is what matters because we’re really after the `Application Support` directory (hence the name of the variable).

Taking Library means:

`tar cf /path/to/Plexbackup.tar ./Library`

is a whole lot easier to type & automate.

---

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 9:09pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/14 "2021-05-21T21:09:08Z")

</div>

Ok, so let me spell this out, once more, because I’m foggy-brained today. lol.  
The new SSD is mounted as “/mnt/plexdata”, so…

1. Stop PMS.
2. tar cf /mnt/plexdata/plexbackup.tar ./Library
3. cd into /mnt/plexdata and tar xvf plexbackup.tar
4. Verify permissions on extracted data
5. set PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR = “/mnt/plexdata”
6. Start PMS

Sound about right?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 21, 2021, 9:10pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/15 "2021-05-21T21:10:35Z")

</div>

One addition.

```auto
sudo chown plex:plex /mnt/plexdata

```

(make sure the top level has permissions (think you have this already)

---

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 9:13pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/16 "2021-05-21T21:13:50Z")

</div>

Yup, that was in there 😉  
Thank you for the patient clarification, I appreciate it!

---

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 9:17pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/17 "2021-05-21T21:17:24Z")

</div>

One clarification, should I set the ENV variable inside my \*nix box, or is there a place in Plex to put it (like the XML file, or will that get overwritten potentially)?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 21, 2021, 9:22pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/18 "2021-05-21T21:22:07Z")

</div>

You change the PLEX\_MEDIA\_SERVER\_APPLICATION\_SUPPORT\_DIR via the systemcl override mechanism.

1. `sudo mkdir /etc/systemd/system/plexmediaserver.service.d`
2. `sudo <editor-of-choice> /etc/systemd/system/plexmediaserver.service.d/override.conf`
3. Add the following lines:

```auto
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/path/to/new/Application Support"

```

You can add `#` comments if you wish.

1. Save the file
2. sudo systemctl daemon-reload
3. sudo systemctl restart plexmediaserver

Details are here:

> [@Moving PMS 'Library'](https://forums.plex.tv/t/moving-pms-library/197342/):
>
> Moving Plex’s metadata (Library) directory on systemd based systems This information is intended for those systems where cat /proc/1/comm returns systemd. If your system returns init, please see the next post in this thread. While you may change /lib/systemd/system/plexmediaserver.service, it is under the control of the package manager and subject to replacement without warning at any time during an update. To provide stability, systemd allows creation of an override.conf file to customiz…

---

<div class="post-metadata">

**Author:** ![Tophicles](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tophicles/32/82119_2.png) [@Tophicles](https://forums.plex.tv/u/Tophicles)\
**Post date:** [May 21, 2021, 9:37pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/19 "2021-05-21T21:37:59Z")

</div>

Sweet, and from now on I use “systemctl” instead of “service” to manage the PMS, correct? I believe that “service” is for init.d ?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [May 21, 2021, 9:48pm UTC](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111/20 "2021-05-21T21:48:40Z")

</div>

Yes. systemctl is for Ubuntu 16+

There is a redirect in place but that won’t last forever.

I decided long ago to make the transition because there are times when I still have to work with init-based systems. This way helps retain my last bits of sanity.

If you’ll forgive the funky QNAP directory naming structure, here’s a bit of a trick – Reading and writing in one shot with no intermediate file… (if you are brave)

```auto
[/share/vtmp] # cd /share/CA*/.qpkg/Ple*
[/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer] # 
[/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer] # 
[/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer] # ls Library/
Plex Media Server/ tmp/
[/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer] # mkdir /share/CACHEDEV2_DATA/chuck-test
[/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer] # tar cf - ./Library/ | (cd /share/CACHEDEV2_DATA/chuck-test/ ; tar xf -)
[/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer] # 

```

[Next page](https://forums.plex.tv/t/moving-folders-to-ssd-question/717111.md?page=2)
