After upgrading to DSM 7, I’m aware of the database relocation, but wondering if anyone has any suggestions on the best way to backup the database to an external USB SSD plugged into my Synology DS720+. I used to just have the scheduled job set up when I used DSM 6, but now that the database is only accessible via SSH, is there a good way to script backing up the DB and keeping a handful of versions?
I currently just use the SSD as the transcoding location but would like to store some historical DB backups there as well as a failsafe. Thanks in advance!
If your Plex folder gets too big for backups, you can do what I do and take a backup of the database & important metadata. Most importantly, leaving out the generated chapter images and index files for live scrolling.
cd "/volume1/@apphome/PlexMediaServer/Plex Media Server"
zip -q -FS "/volume1/MySharedFolder/backup-plex-databases.zip" . Preferences.xml* Plug\-in\ Support/Databases/*.db
zip -q -r -FS "/volume1/MySharedFolder/backup-plex-metadata.zip" . -x "Preferences.xml*" "Cache/*" "Crash Reports/*" "Logs/*" "Plug-in Support/Caches/*" "Plug-in Support/Databases/*" "*/Chapters/*.jpg" "*/Indexes/*.bif"
But if you’re not so much into scripting a bash file like this, waiting for the structure to become visible again inside DSM is probably the way to go.