My server would not update from Ubuntu 18 to 20 So I backed it up and installed a fresh Ubuntu 20.04.3 server.
Had to set all back up like it was. Database and web. Got it working good.
Installed Plax with the .deb package and have to scan all my media again.
Got a backup where is the file I can restore so Plex will see all my media again and don’t have to set it all up again. I guess it’s the Plex database and it was not in the like built in database it must have it’s own?
Still have the old URL to my place open I don’t want to refresh it so I can see how it was. All the folders I had set up have yellow round ! icons next to them. So it lost them looks like.
Same place at my backup and refreshed the URL and looks like it was going to work but I get a yellow round ! next to each folder on the left side still. I guess all most had it.
Yes I back it up all. I made a link to the backup to Link shortcut /usr/lib/plexmediaserver to /media/WD-MyDrive-2TB/plexmediaserver were the backup is.
Renamed the new /usr/lib/plexmediaserver folder to /usr/lib/plexmediaserver~ so I did not delete it.
But when I got to the URL I get a 404 Not Found error.
Then rename the link back how it was refresh the link it it comes up takes a little bit and all my folders show up at the left side but with ! on each of them.
Have some links I pointed to the back up in the /usr/lib/plexmediaserver folder.
The /lib is a link to my backup.
That seems to get the names of the folders but not that database I guess.
I think you’re confusing or not understanding how this all works and ultimately breaking things.
I also believe the default Ubuntu installation helped confuse things too (much like the default Windows installations do)
In Linux, Packages and their data are often stored in different locations.
In Plex, We use two locations which look the same but aren’t.
We place the software (using apt-get) into /usr/lib/plexmediaserver
We place the data, which is what makes your server what it is, in /var/lib/plexmediaserver
When you reinstall, the ubuntu installer will force a reformatting of the HD UNLESS you tell it to do something else.
Just like with Windows, you can create partitions. When you do this, from that point forward, you can separate your data from the operating system.
In my configuration, I have
The / partition which is where Ubuntu resides
A /home partition where all my data (which includes my login directory and everything I use the computer for.
I then customized Plex to place its metadata (the stuff which is your actual Plex server) in the /home partition.
Now, if I have to reinstall the OS (which I just did a few days ago).
I reformat the OS partition (/)
I keep the Home partition (/home)
After installation,
a. Reinstall the Plex software
b. Add my Plex configuration file back to the OS installation (which is a very small file)
c. PMS starts up and has no clue whatsoever that anything was reinstalled. To it, everything is normal.
Would you like something like this so that you aren’t plagued with losing your Plex server in the future?
I can boot the backup. So I guess I can Do what you did on “B. ADD my Plex configuration…”
How do I save that and then how to I put it back to it?
I don’t have my /home. I’t at /media on a lot of hard drives.
I don’t want to start over because I have a lot of info on my videos. I put info text on a lot of them. It took years to do that.
I still get “not Found” because I copy the backup to the same place /usr/lib/plexmediaserver and then I get Not found in :32400/web/index.html# now.
But when I do a htop it shows that plexmedaserver is working. It’s doing something. But the web not not work. Because I copied the backup to the same place. So there must be a database some place. How can I copy that from the backup? I don’t know were it saves it.
Added plex so I could just do a apt install -y plexmediaserver command.
But still don’t work when I got to the URL.
Did this command to see why.
root@server:~# systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/media/3TB-Black-laptop-size/lib/systemd/system/plexmedias>
Active: failed (Result: exit-code) since Sat 2020-09-26 10:25:33 EDT; 14s >
Process: 73478 ExecStartPre=/bin/sh -c /usr/bin/test -d “${PLEX_MEDIA_SERVE>
Process: 73484 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR=”>
Main PID: 73484 (code=exited, status=1/FAILURE)
Sep 26 10:25:33 server systemd[1]: plexmediaserver.service: Scheduled restart j>
Sep 26 10:25:33 server systemd[1]: Stopped Plex Media Server.
Sep 26 10:25:33 server systemd[1]: plexmediaserver.service: Start request repea>
Sep 26 10:25:33 server systemd[1]: plexmediaserver.service: Failed with result >
Sep 26 10:25:33 server systemd[1]: Failed to start Plex Media Server.
lines 1-12/12 (END)
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/media/3TB-Black-laptop-size/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-09-26 10:25:33 EDT; 14s ago
Process: 73478 ExecStartPre=/bin/sh -c /usr/bin/test -d “{PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "{PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}” (code=exited, status=0/SUC>
Process: 73484 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= “{print $2}” | tr -d " )"; export PLEX_MEDIA_SERVER_INFO_DEVICE=“PC”; expo>
Main PID: 73484 (code=exited, status=1/FAILURE)
Sep 26 10:25:33 server systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
Sep 26 10:25:33 server systemd[1]: Stopped Plex Media Server.
Sep 26 10:25:33 server systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Sep 26 10:25:33 server systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Sep 26 10:25:33 server systemd[1]: Failed to start Plex Media Server.
I don’t get why it’s trying to run it from the backup drive. That my be the problem now sure.
How can I do this? It looks like the Database is in with the /var/lib/plexmediaserver folder…
> root@server:~# cat /tmp/plexinstaller.log
> cat: /tmp/plexinstaller.log: No such file or directory
> root@server:~# /etc/systemd/system/plexmediaserver.service
> -bash: /etc/systemd/system/plexmediaserver.service: Permission denied
> root@server:~# cat /etc/systemd/system/plexmediaserver.service
> # DO NOT EDIT THIS FILE DIRECTLY!
> #
> # Plex Media Server's variables can be customized by creating an 'overide.conf'
> # file using 'systemctl edit plexmediaserver' which will create the following;
> # /etc/systemd/system/plexmediaserver.service.d/override.conf
> #
> # An example of the override.conf would be as follows if you wished to edit
> # your user, group, temp directory, or app support directory (without the leading #)
> #
> # [Service]
> # Environment="TMPDIR=/path/to/new/tmp"
> # Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/myusername/Library/Application Support"
> # User=myusername
> # Group=mygroup
> #
>
> [Unit]
> Description=Plex Media Server
> After=network.target network-online.target
>
> [Service]
> Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support"
> Environment=PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
> Environment=PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
> ExecStartPre=/bin/sh -c '/usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"'
> ExecStart=/bin/sh -c '\
> export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \\$2}" | tr -d \\" )"; \
> export PLEX_MEDIA_SERVER_INFO_DEVICE="PC"; \
> export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)"; \
> export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(grep ^VERSION= /etc/os-release | awk -F= "{print \\$2}" | tr -d \\" )"; \
> export LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib; \
> exec "/usr/lib/plexmediaserver/Plex Media Server"'
> Type=simple
> User=plex
> Group=plex
> Restart=on-failure
> RestartSec=5
> StartLimitInterval=60s
> StartLimitBurst=3
> SyslogIdentifier=Plex Media Server
> StandardOutput=journal
> StandardError=journal
>
> [Install]
> WantedBy=multi-user.target
> root@server:~#
It has the number sign before some text that is not code and makes it look big in this post.
Al lso the cat the /etc/systemd/system/plexmediaserver.service is a link to my backup here /media/3TB-Black-laptop-size/lib/systemd/system/plexmediaserver.service Just set that to 755.
So now that command works like this:
root@server:~# /etc/systemd/system/plexmediaserver.service
/etc/systemd/system/plexmediaserver.service: line 17: [Unit]: command not found
/etc/systemd/system/plexmediaserver.service: line 18: Media: command not found
/etc/systemd/system/plexmediaserver.service: line 19: network-online.target: command not found
/etc/systemd/system/plexmediaserver.service: line 21: [Service]: command not found
/etc/systemd/system/plexmediaserver.service: line 25: -c: command not found
/etc/systemd/system/plexmediaserver.service: line 26: -c: command not found
/etc/systemd/system/plexmediaserver.service: line 40: Media: command not found
/etc/systemd/system/plexmediaserver.service: line 44: [Install]: command not found
root@server:~#
removed the apt install with apt remove and then used the plexmediaserver_1.20.2.3343-c91f25744_amd64.deb but it would error saying that /etc/systemd/system/plexmediaserver.service was installed so it errored.It’s a link to my backup.
So I renamed that link with a ~ at the end so plexmediaserver.service~ Then the .deb package installed and I looked and it made a new plexmediaserver.service link to my old backup again.
Went to the URL and it just shows like it’s a new install starting fresh.
It does see that it’s me I can click on my icon with my face and do the pin. Just logging on to my LAN server. I can get to it over the WWW too.