linuxserver / docker-plex

GNU General Public License v3.0
1.16k stars 205 forks source link

Plex not detecting previous server #209

Closed raphattack closed 4 years ago

raphattack commented 4 years ago

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

The previous server should be detected after migrating over backup.

Current Behavior

The previous server is not detected. A nearby server with the same name is detected, but does not have existing libraries, so everything needs to be added again.

Steps to Reproduce

  1. Copy backup files from existing Plex.
    sudo cp -r /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/* config/
  2. Run docker-compose up -d
  3. Browse to http://192.168.1.3:32400/web
  4. Duplicate nearby server is found with empty libraries. Existing server is unreachable. Note: Movies library is showing because I manually added it. Screen Shot 2019-10-11 at 6 29 15 PM

Environment

OS: Ubuntu 18.04 CPU architecture: x86_64 How docker service was installed: installed via official guide.

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d

docker-compose.yml

version: "2"
 services:
   plex:
     image: linuxserver/plex
     container_name: plex
     network_mode: host
     environment:
       - PUID=1000
       - PGID=995
       - VERSION=docker
     volumes:
       - ./config:/config
       - /media/Movies:/media/Movies
       - /media/Shows:/media/Shows
     restart: unless-stopped

Docker logs

$ docker logs plex
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/

Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    995
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 40-chown-files: executing...
[cont-init.d] 40-chown-files: exited 0.
[cont-init.d] 50-gid-video: executing...
[cont-init.d] 50-gid-video: exited 0.
[cont-init.d] 60-plex-update: executing...
Docker is used for verisoning skip update check
[cont-init.d] 60-plex-update: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting Plex Media Server.
[services.d] done.
Exception AttributeError: "'ZipArchive' object has no attribute '_zip'" in <bound method ZipArchive.__del__ of <Framework.components.data.ZipArchive object at 0x7ff96cde3390>> ignored
james-d-elliott commented 4 years ago

Check your config folder, you've copied the files wrong. After the copy you should have a Library folder under the new config folder.

Try this instead:

sudo cp -r /var/lib/plexmediaserver/ config/

EDIT: Make sure you also check GID and UID of the files. The abc user will need access to them, so I'd recommend setting them with chown -R 1000:995 /config too

aptalca commented 4 years ago

Closing as it is not a bug

raphattack commented 4 years ago

@james-d-elliott thanks! That did the trick.