How to backup and restore PMS on QNAP?

Is there a current guide to backing up and restoring PMS’ metadata for QNAP NASes? Preferably explained step-by-step.

I know there are some 5 year old posts, but they may be outdated, wrong, or an easier way to do it.

Eg I’ve found a directory called “PlexData” the seems to be what I’m looking for, the settings and metadata, and was wondering if it’s just a matter of backing that up.

TS-431+ if that makes a difference, and PMS Version 1.22.3.4392

Yes, it’s that easy.

  1. File Station → PlexData → Plex Media Server
  2. Stop Plex
  3. Highlight all the files in the “Plex Media Server” directory and make a tar.gz or ZIP file
  4. Done.

Thanks. So it can only be done manually? ie Having to manually shut down plex. Having to manually zip the files. Having to manually restart Plex?

I was hoping for something I could automate, like I automate the backup of my media files in HBS3. If it’s manual I’m sure I’ll only remember to do it after a disk crash or loss of data, as is usually the case.

I just tried it in HBS 3. Set a sync job for the folder “PlexData” to an external drive. Unfortunately it failed with “…Failed to copy all data and attributes”. Which isn’t that helpful in explaining WHY it failed. 102 bytes in, out of ~6GB.

If you want to write a script…

Something like:

#!/bin/sh

# Stop Plex
/share/.qpkg/Plex*/plex.sh stop

# Make the backup
cd "/share/PlexData/Plex Media Server"
tar cf /share/Public/PlexBackup.tar .

# Start Plex
/share/.qpkg/Plex*/plex.sh start

The reason the normal tools don’t copy anything is because there is no real data in the PlexData shared folder.

It’s a linkage which exposes the .qpkg directory into FileStation. (a trick)

Ok, thanks Chuck.

If you want to write a script

Yeah, a little beyond my wheelhouse unfortunately.

The reason the normal tools don’t copy anything is because there is no real data in the PlexData shared folder.
It’s a linkage which exposes the .qpkg directory into FileStation. (a trick)

That explains it. To put in terms I’m familiar with, it’s like backing up a Windows desktop shortcut, instead of the thing it links to.

If you ever run out of things to add to plex (as if), a user-friendly way to backup the metadata would be much appreciated. Even if it’s a form of that script above that dumps the zip file in a directory the normal QNAP backup software can handle.

ie Somewhere on the Plex settings page…

Backup settings and metadata to zip file in Public folder every week.

Thanks for the replies anyway.

Chris,

I write the packaging. QNAP is SUPER limiting. UGH

A Schedule Task option is something the Server team would need to add. I will submit the request.

Just after my last post I gave HBS 3 another try to sync the PlexData directory. For whatever reason, it started to work this time.

It’s only at 5% so far, but looking at the target drive, it appears the files are copying over.

The only thing I think changed was that I stopped Plex running. Don’t know if that’s what was stopping it though. It’s still got ~6GB of small files to copy so I expect a few hours before it finishes.

The good thing with HBS 3 sync though, is that once the initial sync is done, daily backups are pretty quick.

Once it’s finished I’ll see if I can repeat it. Then try if it works with Plex running.

@ChrisMcMahon

I just had a thought (— which is dangerous as ******* lol)

If you specify /PlexData/Plex Media Server/ (the trailing / is significant), you might be able to fool it.

example:

[~] # ls /share/PlexData/Plex\ Media\ Server
/share/PlexData/Plex Media Server@
[~] # ls /share/PlexData/Plex\ Media\ Server/
Cache/	 Crash Reports/  Logs/	 Metadata/	      Plug-ins/		Preferences.xml
Codecs/  Diagnostics/	 Media/  plexmediaserver.pid  Plug-in Support/
[~] # 

The trailing / causes ls to resolve the link first before operating.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.