본문 바로가기
IT

Plex metadata and index data HDD로 옮기기

by Oh.mogilalia 2018. 5. 20.

Stop Plex

First thing you will need to do is to stop Plex Media Server

sudo systemctl stop plexmediaserver.service

Make sure all Plex services are killed

Next run this command to make sure all Plex services are killed and no longer running

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 “/home/mogibu/apm/www/plex/Application\ Support”

cp -rf '/var/lib/plexmediaserver/Library/Application\ Support' /home/mogibu/apm/www/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

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

ln -s /home/mogibu/apm/www/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

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.

sudo systemctl enable plexmediaserver.service

sudo systemctl start plexmediaserver.service

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.

rm -rf /var/lib/plexmediaserver/Library/Application\ Support.OLD

Voila, you have now moved your Meta and Index data to a new location, profit!

출처 : http://smyl.es/how-to-move-plex-metadata-and-index-data-to-new-driver-andor-directory-location/

'IT' 카테고리의 다른 글

RTC(Real Time Clock)  (0) 2018.05.29
커널 때문에...  (0) 2018.05.20
wordpress 권한 및 퍼미션  (0) 2018.05.18
UPGRADE WORDPRESS SSH ON UBUNTU 16.04 LTS  (0) 2018.05.18
USB-HDD 마운트  (0) 2018.05.18