Using CA Backup modified to minimise Plex Downtime
I've been using the CA Backups Beta Plugin for some time now and very happy with the results. Like many people, I have a large ../appdata/binhex-plex folder (200G / 240,000 files including lots of small metadata ones) and the backup process for this was taking Plex offline for an hour a day (either with stop all or stop individually as the other containers are fairly trivial), which I want to minimise.
The solution I've implemented works well, and takes plex off-line for only 14 minutes now. Here's how it works.
Settings / process - total runtime 42 mins, docker downtime 16 mins
Stop all containers, backup, start all (feels safer as the dockers all cross-talk)
Use Compression "Yes, multicore" using all cores
binhex-plexpass "Skip backup" = Yes
Post-backup script "/mnt/user/admin/copyplex.sh" (this runs with the dockers stopped) - runtime 10 mins
This creates a rsync mirror of the "appdata/binhex-plexpass" folder (on NVME) to "../admin/binhex-plexpass-copy" (on a SSD share "admin") - it takes 10 minutes (after the initial run) as it's just updating changed files.
Pre-run script "/mnt/user/admin/tarplex.sh" (this runs with the dockers running) - runtime 25 mins
This actually runs first, while plex is running, and creates a "zstdmt" backup of binhex-plex-copy in the day's backup folder (/mnt/user/backups/20240522_0400 say), which is cache plus array share and managed by mover tuner to send the older backups to array.
It would be more logical to run 5 before 4 but the "Post-run script" seems to execute before the dockers start, so it would add to the downtime for plex, hence I run it first, and it backs up yesterday's copy of plex created in #4. Plex can be recovered from the /mnt/users/admin/binhex-plexpass-copy folder also.
How can i make this even faster?
Would be be faster to create the rsync copy of plex (step 4) on the same NVME drive (there's plenty of space) or would the increased disk IO on that drive make it slower? I'm also concerned about shortening the life of the drive doing all this reading/writing.
Anyone know why "Post-run script" doesn't run after all the dockers are re-started?
It runs at 4am, so 14 mins downtime for Plex is ok, but my users are friends/family all over the globe. As the database grows i'd like to minimise the downtime and make restoring plex as fast as possible and given i have space not need to restore all the metadata from the internet. Anyone have a similar (or better solution)?
Aidan