Backup via Windows on USB drive: impossible to copy files after "\_combined\"

Hi,

I run Plex on a Synology DS918+ NAS.

And I want to make 2 types of backup:

  • 1 online, on a 2nd NAS via Hyper Backup
  • and 1 on an offline storage, on a USB drive

For this 2nd backup, offline, I tried to connect the USB drive directly to the NAS and use the Synology “USB Copy” app. But this app has a lot of issues, among other, the duplicates it creates…

Unfortunately, I also learned that the 2nd tool recommended by Synology for this context (backuping files to an external USB drive) has the same issue in the same context.

So what I’ve done is to connect the USB drive to my PC and transfer the files via the excellent Free File Sync software.

This works really well to backup the 3To of data of my NAS.
For plex, it also work perfectly well for most files… EXCEPT… the files behind…
\\nas\Plex\Library\Application Support\Plex Media Server\Metadata\(...)\Contents\_combined\

Nearly all files after those \_combined\ sub folders are not copied, triggering “ERROR_ACCESS_DENIED. [CopyFileEx]” errors.

So I tried to use Windows Explorer to copy a file located after a \_combined\ sub folder but same, I got an error saying I need an authorisation from an admin to copy the file.

But I have an admin access and copying all the other files is ok.

Here is an example of file I can’t copy:
\\nas\Plex\Library\Application Support\Plex Media Server\Metadata\Movies\d\2acb11d802ff6020a500480cb5a0e1cf415ca3c.bundle\Contents\_combined\art\com.plexapp.agents.imdb_c043da4cbe7c646d57d1de049e10ef227b001df6

And 100% of the errors are about files after a “_combined” sub folder! 100%.
Not a single error for any other file.

So what’s going on with files behind “_combined” sub folders?
Why can’t we copy/backup them?

Thanks for your help! :slightly_smiling_face:

Hi @trumpy81 ,

Thanks for your answer.

However, question:

Stop Plex from running. You cannot have Plex running and altering files while you are trying to back them up.

Ok. I stopped the server via stopping the packaged, but it didn’t changed anything.
It’s still not possible to copy the files after \_combined\. Same error message.

For the rest, ok, I understand your advise to create a .ZIP, but it’s not very convenient for me.
I’m backuping 7 shared folders, 3To via Free File Sync and I would have to make an exception, setup a dedicated process just for some few files of Plex.

What’s so special with those files behind \_combined\?
Why can’t we just copy them?

Thanks!

  1. Stop Plex from running.
  2. Open Control Panel > Shared Folder and edit the Plex folder. On the permission tab, user plex should have Custom or R/W permissions, then click on OK.
  3. Open File Station and right click on /Plex/Library and select Properties. Check that the owner of the folder is user plex. On the General tab, enable Apply to this folder, sub-folders and files then click on OK.
  4. Right click on Plex/Library again and select Properties. On the Permission tab, enable Apply to this folder, sub-folders and files then click on OK.

Ok, I’ve done your 4 steps (in step 2, Plex have “Custom” with full control).
But it didn’t change anything. Same error message.

If the above does not help, then it is likely that your backup software does not like the underscore in front of the folder name

I don’t think so as:

  • like I said above, it’s exactly the same problem with Windows Explorer, it’s not specific to Free File Sync
  • also, I have absolutely no problem with /_stored/ and all files behind
  • at last, not 100% of the files behind /_combined/ can’t be copied, some few are copied. It looks like it’s only the files in the subfolders (extras, posters, etc.) that are not copied… (this screen shot is from the USB backup drive)

But I’ve also found something weird.
If I use Windows Explorer to have a look at the file structure and files on the NAS side, I can see those files that I can’t copy, like this one…

But, if I use Synology File Station, I can’t even see them !!!

So it looks like there’s really something wrong with the files or the folders that contain them.
But regarding the folder, if I look at the /posters/ properties in the example above, the owner is Plex and the permissions look correct (full control for Plex, R/W for admin) :face_with_raised_eyebrow:

Any idea?

Is that not what he is doing here? Seeking a solution through discussion with others who might have encountered a similar problem?

Come on trumpy… The level at which you speak down to people for trying to do the research you patronize them for not doing (or that they should do) is unreal.

Why do you take it like that?

I have given you my recommendation, if you don’t want to follow it that’s fine, but it is up to you to find a suitable solution.

I have followed your recommendations.
It didn’t fixed anything. What can I do more?

Then you said it’s most likely the backup software issue, but I’m just telling you no it’s not specific to this software as for example Windows Explorer shows the same issue.

Next you’re now telling me it’s a Windows issue but I just showed you even File Station can’t see the files! So nothing to do with Windows.

At last you’re saying it’s “NOT a Plex issue”, fine. I’ve never said the contrary.
I’m only here to ask what’s the specificity (maybe fully legitimate!) of those files/folders to be impossible to copy and not even visible from File Station on DSM?
I really don’t see what I did wrong to suddenly get this type of answer :roll_eyes:

No one said it’s a Plex issue. Once for all!
Just asking for what’s the technical specificity, maybe fully legitimate, to help me find a solution.

Have you noticed I never asked for: how can I backup Plex?
Since the beginning my questions were:

So what’s going on with files behind “_combined” sub folders?
Why can’t we copy/backup them?

But you’ve chosen to never answer my question.
It’s also part of the problem… :roll_eyes:

I’m saying the level at which you reply to those seeking answers is shrewd.

You can inform someone of their misdirection without speaking to them like they are dirt. A little empathy goes a long way.

See that’s what I mean. Why is it necessary to state this? Ignore it or simply state that’s the best advice you can give.

It’s even stated in the forum guidelines:
https://forums.plex.tv/guidelines#heading---civilized

No it’s not.
I told you there’s no problem with \_stored\ and everything behind in exactly the same context. All files are copied. So it’s not the underscore of \_combined\.
It would also not explain why File Station can not even see the files. And this is not Windows related.

Devils advocate, while it might have worked with \_stored\ have you tried removing the underscore from \_combind\\combind\?

If not, humor the suggestion and try it. Apologies if you stated that you did try before.

Just because it works for one thing doesn’t mean it works in another.

Devils advocate, while it might have worked with \_stored\ have you tried removing the underscore from \_combind\\combind\ ?

Good idea, I’ll try to close this option.

Perfect. Then it means something is wrong on my server.

This is NOT the first time I have seen Windows behave oddly when certain file/folder names are involved, I believe this is just another one of those oddities.

It’s not Windows related!!!
It’s on DSM from Synology that runs under Linux that I can’t see the files, NOT Windows!!!
With Windows, it’s fine, I can see the files.

The _combined folder on legacy agents can contain folders with symlinks to other files. You may have issues copying those without passing the correct copy arguments.

If I may jump in here and provide some information?

If I understand the issue here: Backing up the Plex share via Windows –

  1. The metadata files _combined are Linux symbolic links.
  2. Linux symbolic links and Windows symbolic links are implemented differently in the file system
  3. Accessing through the Synology Samba mechanism dereferences the files which yields a COPY of the files. The symbolic link is lost and thereby loses the relationship between source and target.

To make a backup of the Plex share, which doesn’t exist in DSM 7 , the backup must be performed by Linux -OR- by expressly telling Windows & Samba to preserve symoblic links. (no “wide” mode – the root of the problem)

For DSM 7, we handle making backups of the Plex metadata differently.

@drzoidberg33 & @ChuckPa thanks very much! :slightly_smiling_face:
That’s exactly the information I was looking for.

It also explains the issue with File Station as it looks like FS is unable to display Symbolic Links…

Last 2 questions however:

The _combined folder on legacy agents can contain folders with symlinks to other files. You may have issues copying those without passing the correct copy arguments.

1/ Does it mean I may use old agents that could be removed and then get rid of those symbolic links that are unused any more?
Is it possible one way or another to clean all this?

To make a backup of the Plex share, which doesn’t exist in DSM 7 (…)
For DSM 7, we handle making backups of the Plex metadata differently.

2/ Does it mean that in any case, all those symbolic links will disappear as soon as we will upgrade to DSM7 and then Plex for DSM7?

The Plex Movie agent and the Plex TV Series Agent (which is in beta now) are the new agents. Creating new libraries with these agents won’t create symlnks. If you upgrade an existing library to one of these then you’ll need to upgrade as well as refresh all the metadata and then run a Clean Bundles which should (hopefully) get rid of all the unused bundles that use the symlinks.

All music agents still use symlinks, that should be changing at some point soon though as there is work to modernize the Plex Music agent.

File Station does not show symbolic links. It hides (thanks Synology) the fact they are. This is how the breakage begins.

@drzoidberg33 , @ChuckPa thanks very much for your answers!
Everything is much clearer now.

Then it looks very clear that symlnks will be gone soon so there’s no point for me investigating around the best way to backup them.
Instead I’ll clean my library to remove them…
https://support.plex.tv/articles/201198426-restart-plex-media-server-setup-from-scratch/

I don’t have a very big DB and it will be quite easy for me to rebuild it, clean, especially as I’ve only movies, TV series and family videos. I’ve not transferred my music yet so I don’t have to worry about that for now.

Then regarding the agents, what should be my settings to make sure I avoid all symlinks?
Which agents should I disable?
Is the new TV series agent already available or not yet?

Here is what I have now…


Note that on this screenshot, “Plex Movie (Legacy)” can’t be unticked. I hope it will be possible with a new DB…

And Photo? I don’t think it creates simlinks, I don’t have any…

FYI here is the breakdown of simlinks I have:

  • Movies → 3993
  • TV Shows → 135
  • Albums → 6 (just a trial, 2 songs & 3 music videos - can be deleted)
  • Artists → 3 (just a trial, 2 songs & 3 music videos - can be deleted)

Thanks very much for your very helpful information!

@drzoidberg33 , awaiting your answer, I’ve tried your suggestion to upgrade my existing Movies library, knowing that in the worst case, if it wasn’t working, I would still be able to restart my PMS from scratch anyway.

If you upgrade an existing library to one of these then you’ll need to upgrade as well as refresh all the metadata and then run a Clean Bundles which should (hopefully) get rid of all the unused bundles that use the symlinks.

And I can confirm it worked!

1/ I got rid of the 3993 simlinks related to movies.

2/ I also deleted the few songs so I got rid of the Albums & Artists ones.

3/ For for TV shows, I edited the library, set the Plex TV Series (BETA), refreshed all the metadata, cleaned the bundles and got rid of the 135 remaining ones related to TV Shows.

So done!
I have no simlinks any more and could easily backup all my Plex/Library folder without any error.

Thanks very much @drzoidberg33 for your very useful help! :grinning:

BTW @trumpy81 , all this confirms it had nothing to do with Windows or “_” in folder names.

2 remaining questions however:

1/ Can you just point out the agents that create simlinks? (to avoid them)
Here is the list to make it easier for you to just add if they create simlinks of not.
Agents highlighted in red are the ones we can select in Library > Edit… > Advanced > Agent
The other ones are only visible on the Settings > Agents page.

  • Movies > Plex Movie - no simlinks
  • Movies > Plex Movie (Legacy) - simlinks
  • Movies > Personal Media - no simlinks???
  • Movies > The Movie Database
  • Movies > CineMaterial
  • Movies > Fanart.tv
  • Movies > Local Media Assets (Movies)
  • Movies > OpenSubtitles.org

  • Shows > Plex TV Series (BETA) - no simlinks
  • Shows > TheTVDB - simlinks???
  • Shows > Personal Media Shows
  • Shows > The Movie Database
  • Shows > Fanart.tv
  • Shows > Local Media Assets (TV)
  • Shows > Plex Theme Music
  • Shows > OpenSubtitles.org

  • Artists > Plex Music - simlinks???
  • Artists > Personal Media Artists
  • Artists > Last.fm
  • Artists > Fanart.tv
  • Artists > Home Theater Backdrops
  • Artists > Local Media Assets (Artists)

  • Albums > Personal Media Albums
  • Albums > Fanart.tv
  • Albums > Last.fm
  • Albums > LyricFind
  • Albums > Local Media Assets (Albums)

  • Photos > Photos - no simlinks???

2/ How does the Settings > Agents page work?
As this page is really not up-to-date. All new agents are not displayed, some like Plex Music are also not listed and some old can not even be unticked (like Plex Movie (Legacy) or TheTVDB). Even with the last PMS version (1.22.1.4228), after upgrading to 2 new agents, all my settings on the Agents page remain unchanged, the exact same as in my post above.
Weird.

Thanks again for your help!

True, you’re right, it was linked to Windows not able to handle linux simlinks, but absolutely nothing to do with the underscore. I said it before and even attached a screenshot, some files after /_combined/ have always been copied (cf. the very 1st screenshot above) and everything after /_stored/ (directories & files) have also always been copied. It’s a coincidence that the simlinks were after this directory named with an underscore. The issue would have been the same in any other directory.