But since I migrated to DSM7 my Plex folder is empty and the Plex server data is somewhere hidden.
Any hinds / recommendations how to handle backup with DSM7?
I know it has been a while, is there any update on where the database files are stored on synology? I can download a copy of the database but what do I do if I need to restore it? I have looked around in the documentation and forum posts and I canât find anything about where the actual database file is located.
@ChuckPa
Under DSM 6, I understood that I had to stop the plex server before running hyperbackup to backup the plex shared folder. Is this still the case in DSM 7 or can I simply use hyperbackup to backup the entire PlexMediaServer/AppData/Plex Media Server folder without first stopping the Plex Server
For safest backup â Yes. Stopping Plex prior to the backup shuts down and flushes the database to disk ensuring you get all the data records intact at next start.
If you have to, you can back it up live but I wouldnât recommend it as I canât predict how it will behave for you.
If youâre backing up to the cloud and have a slow upload (less than 500 Mbps), and the NAS is busy, youâre going to get a database snapshot which is in flux & otherwise inconsistent between file fragments â thatâs not cool.
If youâre at home, on 1 or 10 GbE, backing up to a drive which can accept the DB in less than 1-2 seconds, your chances of corruption diminish dramatically.
Processing: Plex_Backup.shâŠ
I wonder f you can help ChuckPa. I have a script that stops Plex, Copies the Plex directory to a tar file and the starts plex. This used to work on Synology DSM 6. Iâm finding with DSM 7, that Plex stops, the tar file is created, and while it says it is starting Plex, it doesnât actually Start plex again.
My script is:
#!/bin/sh
# Stop Plex while we make the backup
"/var/packages/PlexMediaServer/scripts/start-stop-status" stop
# Make a full backup of all the metadata, configuration, and databases
tar cfz /volume1/Plex-Backups/plex_backup.tar /volume1/PlexMediaServer/AppData --exclude=/volume1/PlexMediaServer/AppData/PlexMediaServer/Cache
# Restart PMS
"/var/packages/PlexMediaServer/scripts/start-stop-status" start
# Set the permissions on the backup file so they can be accessed by the admin user
chown admin.users /volume1/Plex-Backups/plex_backup.tar
Further, you / we canât launch PMS manually AND have it connected into Package Center . the PlexMediaServer shared folder . or hardware transcoding. Synology has it setup such that they are in full control and arenât letting go.
The best you can hope for is HyperBackup.
I do have some ideas but not sure if itâs going to be supported across multiple DSM 7 versions.
I have been running this synology .sh task. It seems to be stopping plex, copy files using rsync, start plex. I run a hyperbackup later to copy the files a different NAS. I havenât tested recovery yet.
#Stop Plex while we make the backup
synosystemctl stop pkgctl-PlexMediaServer.service
#Make a full backup of all the metadata, configuration, and databases
rsync -ar --exclude=âCacheâ â/volume1/PlexMediaServer/AppData/Plex Media Server/â /volume1/Backup/Plex/
I love your code - thank you. It does what I want.
But it only works if I use the sudo command before synosystemctl.
This makes is challenging to automate this backup every night.
Any advice for running this script without requiring sudo, or some other fix so this can be a scheduled task that runs in the middle of the night without me needing to manually run it? Thanks!