Plex - Tip/hack for faster app startup during backups |

Plex Tip/hack for faster app startup during backups

  • Stop using Chrome! Download the Brave Browser via >>> []
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the
Serving the Community since 2016!
Register Now


Original poster
Nov 17, 2019
If you have a large Plex or emby library backups can keep the service down for a while. What I've noticed though is for plex and emby, the db's tend to backup very early on in the backup, usually within the first minute due to the folders coming first alphabetically. It's the dbs you want to capture with the container stopped, the rest can be backups up while the container is running, at least from my experience.

So I added a cronjob after the backup cronjob to start the container 5m after the backup starts. E.g. if cronjob is:

30 9 * * 3 echo plex > /tmp/program_var && bash /opt/pgvault/pgcron
I add a line to Cron like this:

35 9 * * 3 /usr/bin/docker start plex
Keeps the outage to less than 5 minutes. Worst case, if it starts before the db is backed up, the Plex DB directory has several backups stored which are generated by plex itself. Those are properly captured whether the container is running or not, simply stop container, rename one of the backup files to the db filename after a restore and start the container. But I've restored my Plex container a few times from backups taken with this start cronjob in place without issue.

Recommend NewsGroups

      Up To a 58% Discount!