create manual backup

shutdown

kgp | grep plex
kubectl exec --stdin --tty plex-7c7678c96d-btc28 -- /bin/bash
ps aufx

output:

root@plex-7c7678c96d-btc28:/# ps aufx
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        6305  0.0  0.0   7740  4224 pts/0    Ss   10:42   0:00 /bin/bash
root        6345  0.0  0.0  10888  4224 pts/0    R+   10:59   0:00  \_ ps aufx
root           1  0.0  0.0    440     0 ?        Ss   Aug31   0:00 /package/admin/s6/command/s6-svscan -d4
root          16  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise s6-linux-init-shutdownd
root          24  0.0  0.0    204     0 ?        Ss   Aug31   0:00  \_ /package/admin/s6-linux-init/comman
root          38  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise svc-cron
root         174  0.0  0.0   7480  3584 ?        Ss   Aug31   0:00  \_ bash ./run svc-cron
root         185  0.0  0.0   5692  1792 ?        S    Aug31   0:00      \_ sleep infinity
root          39  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise svc-plex
abc          172  0.2  0.8 228896 131456 ?       Ssl  Aug31  15:52  \_ /usr/lib/plexmediaserver/Plex Media
abc          223  0.0  0.2  65348 44336 ?        SNl  Aug31   2:41      \_ Plex Plug-in [com.plexapp.syste
abc          271  0.0  0.0  42892 12800 ?        Sl   Aug31   4:01      \_ /usr/lib/plexmediaserver/Plex T
root          40  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise s6rc-oneshot-runner
root          49  0.0  0.0    208     0 ?        Ss   Aug31   0:00  \_ /package/admin/s6/command/s6-ipcser
root          41  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise s6rc-fdholder

summary output:

s6-supervise svc-plex
 \_ /usr/lib/plexmediaserver/Plex Media Server
     \_ Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Pl
     \_ /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Re

To stop the plex service inside the container you can do this: docker -exec plex bash -c "s6-svc -d /var/run/s6/services/plex" and then to bring it back up, use: docker -exec plex bash -c "s6-svc -u /var/run/s6/services/plex"

s6-svc -d /var/run/s6/services/plex Found with :ps aufx Here you go: s6-svc -d /run/service/svc-plex (src: https://www.reddit.com/r/PleX/comments/rrbfdt/comment/hqfgkbc/)

so I should use

s6-svc -d '/usr/lib/plexmediaserver/Plex Media Server'

nope s6-svc: fatal: unable to control /usr/lib/plexmediaserver/Plex Media Server: Not a directory

ls -l /run/service/svc-plex

output

lrwxrwxrwx 1 root root 31 Aug 31 13:23 /run/service/svc-plex -> /run/s6-rc/servicedirs/svc-plex

so I should run

s6-svc -d /run/service/svc-plex

YES

ps aufx

output no longer has plex stuff

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        6305  0.0  0.0   7740  4224 pts/0    Ss   10:42   0:00 /bin/bash
root        6373  0.0  0.0  10888  4224 pts/0    R+   11:49   0:00  \_ ps aufx
root           1  0.0  0.0    440     0 ?        Ss   Aug31   0:00 /package/admin/s6/command/s6-svscan -d4 -- /run/service
root          16  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise s6-linux-init-shutdownd
root          24  0.0  0.0    204     0 ?        Ss   Aug31   0:00  \_ /package/admin/s6-linux-init/command/s6-linux-init-shutdownd -d3 -c /run/s6/basedir -g 3000 -C -B
root          38  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise svc-cron
root         174  0.0  0.0   7480  3584 ?        Ss   Aug31   0:00  \_ bash ./run svc-cron
root         185  0.0  0.0   5692  1792 ?        S    Aug31   0:00      \_ sleep infinity
root          39  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise svc-plex
root          40  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise s6rc-oneshot-runner
root          49  0.0  0.0    208     0 ?        Ss   Aug31   0:00  \_ /package/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ipcserver-access -v0 -E -l0 -i data/rules -- /package/admin/s6/comma
root          41  0.0  0.0    216     0 ?        S    Aug31   0:00 s6-supervise s6rc-fdholder

copy db

cd /config/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/

cp com.plexapp.plugins.library.blobs.db com.plexapp.plugins.library.blobs.db-$(date +%F)-manual
cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db-$(date +%F)-manual

restart plex

s6-svc -u /run/service/svc-plex

euhm, seems like plex does not work with dbs other than sqlite???