Backup Plex folder

Server Version#:1.20.4.3517
Player Version#:NA

How do I backup the Plex folder that Plex Server installed. I assume there is a database in this folder and databases cannot normally be backed up while they are running.

I plan on using the Synology cloud-sync to somehow back up this folder.

Thanks.

DSM 5, 6 , or DSM 7 beta?

Chuck, Thanks for asking. DSM Version 6.2.3. Tha begs the question: why does it matter other than bugs in 6 or 7 Beta? Does Plex have an API I can call that does something like Database dump/load? I don’t know if this is as simple as shutting Plex server down and running “tar” to make a tarball and send that to the cloud.

Thanks for clarifying.

I ask because DSM 5 and DSM 6 have easy access to the Plex shared folder.

It’s as simple as:

  1. Control Panel - Shared Folders - EDIT the Plex share
  2. Permissions tab
  3. Give your username R/W permission & Save
  4. Open File Station
  5. Plex share
  6. Stop Plex
  7. Right-Click Library
  8. Compress to Library.zip

This is where you can use HyperBackup or other tool to backup “Library”.

Everything needed is in there.

  1. Server config
  2. Databases
  3. Metadata

Really cool. Is there a way I can script that as part of the Plex maintenance window?

I assume recovery is as easy as shutting Plex server down; reloading the Plex folder and media folders; restart Plex. Correct?

Under DSM 5 & 6 ,

AS ROOT:

"/var/packages/Plex Media Server/scripts/start-stop-status" stop

(or start )

When reloading, make absolutely certain the owner of everything is plex:users

Under DSM 7 Beta - I’ve not worked that out yet. I’m having enough “fun” making the package work stable in the first place

Chuck you are fantastic. I will mark your previous post as solution. This gives me a way to think about scripting so thanks!

Regarding APIs: I am hoping your Plex App Server would host an API interface as REST with JSON payload that you use for everything after passing OAuth JWT. A subset of this API could be exposed to customer developers like myself. In my case I have a lot of things my Synology Docker interface should perform including Plex backup and updating the Plex “featuring” tag as presented by the IOS Plex App display. DB Poweramp, as good as it is, hasn’t given me all the features of your server:-)

Comments welcome.
Allen

BTW, forgot to mention that APIs are often documented by Swagger or whatever it is called now.

I don’t know what can be done about API access.
To the best of my knowledge (big disclaimer here), there is something the Plex clients and server use (makes sense). I don’t know what it is exactly, but I do know the communications does require internal Plex knowledge to make it work which I don’t think they’d be overly willing to make public.

Staying on topic of the backup/restore –

I already have that work on my schedule.
DSM 7 is going to make the implementation a bit awkward.

Current plan is to use the Synology Installation/Update wizard mechanism because it affords me support for multiple languages (which I’m implementing for the installer suite now)

Good luck on your DSM 7 tasks. I am looking forward to an “excited” Chuck when you complete the tasks.

Synology is a great end-user product. With their strange Linux distro and design methodologies, it isn’t surprising they make your tasks hard:-). It will be interesting to see if App developers, like Plex, will move to Docker to mitigate low level districts headaches.

Oops — “distros” not “districts.” Thanks for taking the time to respond to my API concept. I agree that there will always be internal interfaces that are Plex-only. Public facing APIs need to protect the core Plex infrastructure.

I have absolutely no plans of migrating the main Synology package to a Docker base.

The headaches and obstacles conquered just to make a native package run were insane.

Now, add that Docker is essentially a chroot() environment, you get all kinds of permission complications because of how EVERY user application must run unprivileged AND ask DSM for resource allocations at time of installation.

How is a Docker image going to ask the already-installed Docker package to grant it resources it does not already have (this is because DSM gives the Docker package its requested resources at installation time). Further, there will be no setuid / setgid capability if Synology holds true to what they did to us.

If they do not adhere to the same strict rules they have enforced on us, I’m going to cry FOUL!!

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