Copy PMS metadata from Mac to PR4100 NAS

Please post the entire commands you ran as well as their output starting with stat.

Including the long listings from the Plex folders? Or should I remove them?

Not including that. I’d just need to see the stat and chown command and their output.

root@BPMyCloud root # stat /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/
File: /mnt/HD/HD_a2/plex_conf/Plex Media Server/
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 901h/2305d Inode: 120455487 Links: 11
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-10-08 17:42:58.000000000
Modify: 2018-10-12 10:51:54.000000000
Change: 2018-10-12 10:51:54.000000000

root@BPMyCloud root # rm -r /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/*
root@BPMyCloud root # exit
Connection to 10.36.62.243 closed.
iMac:~ pantelic$ rsync -avzP --dryrun --exclude=.DS_Store ~/Library/Application\ Support/Plex\ Med
rsync: --dryrun: unknown option
rsync error: syntax or usage error (code 1) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/main.c(1337) [client=2.6.9]
iMac:~ pantelic$
[Restored 12 Oct 2018 at 17:08:09]
Last login: Fri Oct 12 16:21:52 on console
iMac:~ pantelic$ rsync -avzP --dry-run --exclude=.DS_Store ~/Library/Application\ Support/Plex\ Media\ Server/ [username]@[nas_ip_address]:/mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/
ssh: Could not resolve hostname [nas_ip_address]: nodename nor servname provided, or not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/io.c(453) [sender=2.6.9]
iMac:~ pantelic$ rsync -avzP --dry-run --exclude=.DS_Store ~/Library/Application\ Support/Plex\ Media\ Server/ [sshd]@[10.36.62.243]:/mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/
ssh: Could not resolve hostname [10.36.62.243]: nodename nor servname provided, or not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/io.c(453) [sender=2.6.9]
iMac:~ pantelic$ rsync -avzP --dry-run --exclude=.DS_Store ~/Library/Application\ Support/Plex\ Media\ Server/ sshd@10.36.62.243:/mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/
sshd@10.36.62.243’s password:
building file list …
317340 files to consider
created directory /mnt/HD/HD_a2/plex_conf/Plex
./
FirstRun
dlnaclientprofiles.xml
update-log.txt
Codecs/

iMac:~ pantelic$ chown -R 0/ root:0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ root: 0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R ( 0/ root):frowning: 0/ root) /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

-bash: syntax error near unexpected token `(’

iMac:~ pantelic$ chown -R 0/ root:0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ sshd/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ root:0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ 0/ /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ root 0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ shhd 0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ macchiato 0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ root:0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R (0/ roo)t:(0/ root) /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

-bash: syntax error near unexpected token `(’

iMac:~ pantelic$ chown -R ( 0/ roo)t:( 0/ root) /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

-bash: syntax error near unexpected token `(’

iMac:~ pantelic$ chown -R ( 0/ root):frowning: 0/ root) /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

-bash: syntax error near unexpected token `(’

iMac:~ pantelic$ chown -R (0/ root):(0/ root) /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

-bash: syntax error near unexpected token `(’

iMac:~ pantelic$ chown -R 0/ root:0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$

iMac:~ pantelic$ chown -R 0/root:0/root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/root: illegal group name

iMac:~ pantelic$ chown -R 0/root : 0/root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/root: illegal user name

iMac:~ pantelic$ chown -R 0/ root:0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ root: 0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R 0/ root: 0/ root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: 0/: illegal user name

iMac:~ pantelic$ chown -R root:root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: root: illegal group name

iMac:~ pantelic$ chown -R root:root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

chown: root: illegal group name

iMac:~ pantelic$ chown -R root:root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

Alright, now I know what’s up. Two things:

#1
Unless I am missing something, you never ran rsync without --dry-run. For reference, here’s the full command including your details so you can just copy and paste it:

rsync -avzP --exclude=.DS_Store ~/Library/Application\ Support/Plex\ Media\ Server/ sshd@10.36.62.243:/mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

Please run this first step before attempting the next one.

#2
I forgot to mention this in my first post: You need to be logged in to your NAS via ssh to run the chown command. Going step by step (starting on your mac):

ssh sshd@10.36.62.243

Run and enter password, once logged in to your NAS:

chown -R root:root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

You should be able to use these commands by just copy and pasting them. Let me know if it works.

Well I think I did run the rsync command; it listed the files being copied and it took a while to complete. Isn’t this the rsync command:

iMac:~ pantelic$ rsync -avzP --exclude=.DS_Store ~/Library/Application\ Support/Plex\ Media\ Server/ sshd@10.36.62.243:/mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/

sshd@10.36.62.243’s password:

building file list …

317340 files to consider

created directory /mnt/HD/HD_a2/plex_conf/Plex

./

FirstRun

You are correct. It was just missing from the above output. You’re good to continue with #2.

No response, just blank. Is it supposed to be like that ?

root@BPMyCloud root # chown -R root:root /mnt/HD/HD_a2/plex_conf/Plex\ Media\ Server/
root@BPMyCloud root #

Yes! Absolutely. You can now continue with the remaining from the guide.

A piece of advice: Do not delete the Plex folder from your Mac unless your are certain that everything is running well on your NAS. I’d keep the data for a couple of days at least.

I’ve rebooted and started PMS but it seems, so far, that we were not entirely successful. It appears that Plex is pulling information from the internet and ignoring my titles and data (which should already be there). It is slowly adding the files with new metadata.

Let it run for now. Worst case: You have to do it again.

What’s the path under Settings > Scheduled Tasks > Backup directory?

/mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Plug-in Support/Databases

Well then I guess we copied the data to the wrong folder and we’re going to have to start over. Can you cancel the process/shut the PMS down?

OK cancelled, signed and switched off PMS in NAS.

Alright, here’s what you need to do:
#1: Log into your NAS using ssh.

#2: Delete existing metadata from actual folder

rm -r /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex\ Media\ Server/*

#3: Log out of your NAS using exit.
#4: Copy the desired metadata using rsync:

rsync -avzP --exclude=.DS_Store ~/Library/Application\ Support/Plex\ Media\ Server/ 'sshd@10.36.62.243:/mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex\ Media\ Server/'

#5: Log into your NAS using ssh.
#6: Make sure the correct user and group own the files:

chown -R root:root /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex\ Media\ Server/

#7: Repeat remaining steps from guide.

The rsync took a while. But with chown command the output was a Long listing where each line ended in: ‘no such file or directory’.
(I just realized they all relate to subtitles.)

Here is a sample:

es_447dea0718d283ee7250318388ea09f724e81a32.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/58f33ebb5c750ab989f57ffb501c64ca2c65bbd.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_dc5bb27c57eb34bda3988d39b9305a1318f3f222.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/58f33ebb5c750ab989f57ffb501c64ca2c65bbd.bundle/Contents/Subtitles/hr/com.plexapp.agents.opensubtitles_be0ba3e90eb2d444fff70fd245c2b743a4dfe2a5.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/5b1f74b533c11e515f35b6cf16adcefccecf144.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_377444f2d2ca6fe926335a6d6f6b378a23a5ebbb.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/5b1f74b533c11e515f35b6cf16adcefccecf144.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_c73bc12bc8e5a0646ac61c5ba3c80f883908cd33.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/69773f11404987e70db291fafe8fce516ba4bb5.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_1977c011836e0ae7a5652aaa9d6ad11f684fd3bf.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/7b276714307cc28e5ecbe49772128a22fbad0e8.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_40e0d74c9d1132e1d70a59923d4c19e62f043c3e.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/7b276714307cc28e5ecbe49772128a22fbad0e8.bundle/Contents/Subtitles/hr/com.plexapp.agents.opensubtitles_862956c531185b481a047df00ea60d41b5d6d05a.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/a4536d81c1903b140480d7efe2f65d8fed2ccd1.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_1d17d664a49fe9f79420ac4e7b5834aa22be7720.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/a4536d81c1903b140480d7efe2f65d8fed2ccd1.bundle/Contents/Subtitles/hr/com.plexapp.agents.opensubtitles_85702d247f32113a7d527e031c0a9c2fd44216b3.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/c08c78dc6672c578430d20c4d5ea07cfc54ebb5.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_8686eec24c9eacc20971678d944bc32cc2f36492.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/d5aa62c43428fb8b451c32373f1679f20e842b0.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_a09ef543eda966186611c306d3e1f9837f097191.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/d5aa62c43428fb8b451c32373f1679f20e842b0.bundle/Contents/Subtitles/hr/com.plexapp.agents.opensubtitles_8f7a7e8bb692138ca5b0d32f20d5bda0cdde433f.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/ddad091cc94dc2581ba867c1143f303ea07f57e.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_5fc69dec433d59f36aed138fe7ae5af2d2215f7e.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/ddad091cc94dc2581ba867c1143f303ea07f57e.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_cb77946b53e0cd1605a18a9b1fc23bbc34976125.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/eacb6cdd96a9603a1fe55fa0dc2e656512e5901.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_d679f2cf98fc2b58d6a55ed6a5706bba4144f520.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/fc63d9e1eda0b377a5752a6059ad5182ab739cf.bundle/Contents/Subtitles/en/com.plexapp.agents.opensubtitles_9688c01b635278abadda8e592bbc0f4d55b6ff25.srt: No such file or directory

chown: /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex Media Server/Media/localhost/f/fc63d9e1eda0b377a5752a6059ad5182ab739cf.bundle/Contents/Subtitles/hr/com.plexapp.agents.opensubtitles_2f53626d61b2a52774ad00f4e86be8a24c07ba0e.srt: No such file or directory

root@BPMyCloud root #

These are most likely links to .srt files that are stored somewhere else on your Mac. You don’t happen to know where? The paths look weird to me, not like part of a normal Plex Media Server-folder. I’m sorry but I’m flying completely blind here since I have neither a Mac nor a compatible NAS at hand to test this.

You could simply start PMS again to see what happens.

Just so I get to see the a feeling for the source folder structure, could you run this on your Mac?

ls -l ~/Library/Application\ Support/Plex\ Media\ Server/

iMac:~ pantelic$ ls -l ~/Library/Application\ Support/Plex\ Media\ Server/
total 208
drwxr-xr-x 5 pantelic staff 160 27 Sep 04:26 Codecs
drwxr-xr-x 26 pantelic staff 832 27 Sep 04:26 Crash Reports
drwxr-xr-x 2 pantelic staff 64 18 May 02:05 Diagnostics
-rw-r–r-- 1 pantelic staff 0 11 Jan 2011 FirstRun
drwxr-xr-x 4 pantelic staff 128 14 Mar 2018 Media
drwxr-xr-x 7 pantelic staff 224 14 Mar 2018 Metadata
drwxr-xr-x 8 pantelic staff 256 14 Mar 2018 Plug-in Support
drwxr-xr-x 13 pantelic staff 416 10 Oct 08:40 Plug-ins
drwxr-xr-x 2 pantelic staff 64 11 Jan 2011 Scanners
drwxr-xr-x 2 pantelic staff 64 11 Jan 2011 Site Configurations
drwxr-xr-x 4 pantelic staff 128 14 Mar 2018 Thumbnails
drwxr-xr-x 39 pantelic staff 1248 27 Sep 04:25 Updates
-rw-r–r--@ 1 pantelic staff 26044 16 Jun 2013 dlnaclientprofiles.xml
-rw-r–r-- 1 pantelic staff 73906 27 Sep 04:26 update-log.txt

Alright, let’s call a day here. I’ll try to come up with a solution and you should probably perform a fresh install of Plex on your NAS. One thing you can do after the fresh install. Log into your NAS via ssh and run:

ls -l /mnt/HD/HD_a2/Nas_Prog/plex_conf/Plex\ Media\ Server/

OK I’ll do that. Thanks so much.

1 Like