mirror of
https://github.com/007revad/Synology_Plex_Backup.git
synced 2026-04-25 08:05:53 +03:00
[GH-ISSUE #25] Plex Container Backup problems - different directory structure - script doesn't complete #1
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Synology_Plex_Backup#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RadTunesly on GitHub (Apr 6, 2025).
Original GitHub issue: https://github.com/007revad/Synology_Plex_Backup/issues/25
First of all I wanted to say thanks for the work you do. Your scripts have helped me immensely.
I've been using your Plex Backup script very successfully when Plex was installed directly on my Synology. I've since moved it to a container (image: ghcr.io/hotio/plex, v1.41.5.9522) which seems to have a different directory structure than what your script is looking for. In the defined base application data directory, these are the folders I have:
The "~plex" folder only contains a reduced version of "Preferences.xml" as follows (nothing else exists in any of the other directories listed below, unless they are hidden):
/~plex/Library/Application Support/Plex Media Server/Preferences.xmlThis version only defines
MachineIdentifierandProcessedMachineIdentifierwhereas the copy in the base application data directory has all the standard variable definitions.I'm using the latest version of your script and have defined
Docker_plex_pathas the base application data directory for the container.I've made a change to line 336 where it is looking for the docker Logs file so it is looking only in the base application data directory (removing "Plex Media Server" from the path).
Plex_log="${Plex_Data_Path}/Logs/Plex Media Server.log"I've also made a change to line 478 which defines
PMSas"Plex Media Server"for creating the .tar, replacing it with an empty string ("").When I run the script via Task Scheduler as root, I get the following output (the error log just shows the same errors listed below):
The script takes a long time to run (most I gave it was 3 hours) and I believe in changing PMS value to an empty string, tar is trying to backup from "/" so is trying to back up far more than it needs to inside the container directory (or is it now trying to back up the entire contents of my DiskStation?). I have to use SSH to kill it with command
kill -15 <PID>, which seems to be why it exits cleanly and restarts the container. The Permission Denied errors surprised me as I thought "root" should have access. There is only a single non-admin user with access to the application data directory.I'm pretty new to containers and scripting in general so the most likely explanation is that I've missed something or am not understanding Synology user/root permissions properly (likely both).
Do you have any advice on what I could do to get it going?
Thanks for your time.
@RadTunesly commented on GitHub (Jul 31, 2025):
Turns out even if you make something perfect and idiot proof, they will just build a better idiot. Feel free to delete this disaster.
Appreciate your good work.
@007revad commented on GitHub (Jul 31, 2025):
@RadTunesly Sorry I didn't answer this back in April. I'd just moved into my new home and was very busy.
@RadTunesly commented on GitHub (Jul 31, 2025):
Not at all mate, I had overlooked some of your very explicit instructions and went looking for zebra instead of seeing horse. The moment I came back to it with a fresh set of eyes it was very clear, as are your instructions.