So after I switched to Ubuntu 16.4 every update changes /etc/systemd/system/plexmediaserver.service.d/override.conf and removes the user by putting it on it’s own line adding new_plex_username and new_plex_group before restarting the service as root.
The whole foobar file looks like this:
#
# Plex Media Server - Systemd service override file
#
# All entries must be systemd compliant (Environrment="var=absolute_value")
#
[Service]
# If you wish to change Plex's Username or Group, uncomment the field(s) below and
# change to the correct values
#User=new_plex_username
#Group=new_plex_group
# Your PLEX_MEDIA_SERVER_NewTmp definition has been migrated forward for you.
# The prefered method of changing it is through the Plex/Web GUI Server settings for the Transcoer
User=
new_plex_username
Group=
new_plex_group
My original override.conf file worked and I though an override file were to override defaults so packages should’t really touch this as all?
The first thing it does is change the preferences so the new server is no longer the same as the old my whole media server incomplete and impossible to start again. I have tried to chown root files before restarting but I have always ended up having to remove everything and start over regestering a new media server, adding new libraries and every user have to reregister everything they have seen etc. For me it takes over 3 hours to fix this for the whole family and I’m getting tired of it.
How is this possible. Are everyone running their service as root?
What version of PMS are you running? (what did you last load?)
How can I help you get your stuff back online?
As for the FUBAR , That was lot of MY doing, not the devs. I messed up and didn’t count all the different ways Ubuntu did ■■■■. It went by ALL of us.
If you go look, you’ll see override.conf.prev That’s what you previously had as the override. That’s the safety net. If you did a unit-level override and created /etc/systemd/system/plexmediaserver.service… that WASN’T foolproof.
Trying to blend Ubuntu, Centos, Debian, Mint, and Fedora, with the init, upstart, and systemd ways of starting is a royal Bxxxx
It shouldn’t take you more than a minute to undo my F-up by stopping PMS, moving the prev override back to active, check the variable values, and starting.
As for it happening again? I’m REWRITING IT… AGAIN.
It doesn’t take a minute since when the system started as root it does unfixable changes to $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR so that the media server gets a new id, not claimed and when i restart with correct user it might start up but eventually shut down. Waiting hours for the 10GB directory to be chowned back and then seeing it still is the new server that has no recollection of the old libraries is a drag.
The last upgrade that did this is 1.1.3.2700-6f64a8d. The previous version number I don’t know but was the previous available since PMS nags me about upgrades as fast as they are available and often clients, like on my nexus player, refuses service since it is automatically upgraded by default.
PMS has settings about backup. Can I rsync that and somwhow use that to restore an old server? How does it work with restoring from backup?
Anyway I hope override.conf is left untouched during the next upgrade.
Note that I’m not after backing up my media files, just the PMS state. What videoes it has scanned and what the different user have seen of this. I’m not interested in stuff that can be regenerated like posters etc. My home videos had meta data stored since they have bad file names and no place to get sensible names or tags and that is going to take weeks to restore as we need to watch each one and readd it.
I’m happy to report that my last update from 1.1.3.2700-6f64a8d to 1.1.4.2757-24ffd60 did not touch existing files and thus the server started up with the same user as before.
I made a copy of $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR and it took painstaking 40 minutes and ended up as a 3.3GB tarball even with the cache directory excluded and gzip compression. The bacup was done with plexserver turned off since I didn’t know if it had to be off or not, but I fear that writes to db or meta files might become inconsistent if it’s not off. Perhaps I could make a nightly conjob that turns plex off after it’s done its nightly tasks, take a backup, then turn it on again?