Moving my metadata to a new server

I have a Plex server that I’ve just moved to another server, and its a large library, and on the new server, Plex is redownloading metadata for every single file, even though it already exists. Could you tell me

a. Is this normal
b. why would it be doing this if the metadata is already there?

I have a really large library and this task is going to take an absolute age, and I would very much like to avoid doing it, what exactly is it that Plex is seeing that doesn’t match up with the old server in the metadata?

how did you accomplish the move ? (tar ball – from original to new host ? )

The plex metadata and db wad moved out of my server, to another server while i wiped my current server then transferred back to my freshly installed ubuntu 22.04 then I ran plex via docker pointing at the backed up meta/db.

@JL94x4

What I’m asking is HOW (which commands you used) you moved them out and back.

What I think you have here is a misalignment of paths (most likely) or permissions (least likely).

If paths were 100% correct but permissions wrong – PMS would fail to start.
If paths not 100% – it would create a new server instance where it expects it to be.

This seems to be what you’re describing?

No, sorry if i wasnt clear.

Plex both starts and ALL my files are there populated with metadata. However when Plex is doing its library scan it is obvious to me that plex believes the metadata is either

A. Outdated
B. Not there

As its basically redownloading metadata for every single movie/show. For example my library that has my tv shows has been scanning now for over 24 hours.

Sorry, the files are being reanalyzed. Not refreshing metadata, my mistake.

I’m really sorry if what I’m asking for isn’t clear.

I am asking because if you made a perfect (image) copy of the files from one location to another, AND, verified permission and ownership is correct, AND the same version of PMS is used – There will no rescanning of media for any reason – UNLESS – the path to the media itself changed.

I had asked how you moved the files: mv ? cp -r ? tar ? something else ?
HOW did you copy/move it ?

I ask because this will help point us in a direction.

As it stands right now, everything is guesswork which means –

I need to see the log files.

Settings - Server - Troubleshooting - Download Logs –

Attach the ZIP file (all of it) that it gives you.

Plex Media Server Logs_2022-06-09_03-06-59.zip (4.7 MB)

Here you go. It was zipped via tar, transferred and unpacked.

Finding a few things:

  1. Transcoder temp directory:
Jun 09, 2022 02:45:21.993 [0x7f6fc30a3b38] ERROR - [Transcode/5bbc0dfc573ba738-com-plexapp-android] Error creating directory "/home/plex/transcode": Permission denied
  1. HW transcoding – CPU capable but no device passed into container.
Jun 09, 2022 02:45:21.001 [0x7f6fc30a3b38] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Generic error in an external library
  1. Media analysis.

If you changed versions of the container and the upgrade is significant, it would explain why it’s reanalyzing all its media.

I also saw where it found matches and was re-using analysis it already had.

Judging by the amount of activity , you have a large library?

This is one item being analyzed. 3.5 seconds on your Xeon.

Jun 09, 2022 02:57:53.546 [0x7f6fc5a14b38] DEBUG - Media Analyzer: Background analysis completed in 3.5 seconds, removing 1 IDs

Okay so

On the old server i had plex installed via sudo dpkg on the new server i am using docker run, but the permissions and thr location of the plex db/metadata is exactly the same.

Would changing from installing via dpkg to docker mean all media needs to be reanalyzed, im still confused as to why the /home/plex/transcode location would have an effect on media analyzing.

What steps would you suggest i do to solve this issue from here?

If it’s installed differently, does it use the same user? When attempting to install my Plex into docker, I recall there being all kinds of requirements for checking the user that Plex would run under (didn’t matter, since I had only one account, or something). But perhaps you need to worry about UID?

What would be the best way to check what user the metadata is owned by before and after?

I’m afraid the extent of my Linux knowledge (next to none) is not enough for that. I hoped my question was sufficient for someone to chime in with the right info… :flushed:

When you use the native package, user plex gets its own account on non-login account like any other Linux service.

You need the transcoder temp directory to download codecs for the transcoder to install.

Since you’re switching to Docker but also want to use the existing data, you want the UserID & GroupID inside the container to match the UserID & GroupID of user plex:plex

To get this info: id plex will print out the user id (UID) and group id (GID)

Now, you must create the container and assign the PUID/PGID, PLEX_UID/PLEX_GID

As you do this, if you’re using HW transcoding, you pass in /dev/dri
and map /config to /var/lib/plexmediaserver (or wherever you have it)

I’m having a much worse problem right now. I don’t know if you can help with this.

I’m getting “Something went wrong” on the recommendations page of two of my libraries, both of which are TV libraries.

When I click on the library this is the error I get;

Jun 10, 2022 07:07:45.764 [0x7f6e7e676b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:45.764 [0x7f6e7e676b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:45.953 [0x7f6e7d675b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:45.954 [0x7f6e7d675b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:46.142 [0x7f6e7e630b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:46.142 [0x7f6e7e630b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:46.425 [0x7f6e7e676b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:46.425 [0x7f6e7e676b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:46.732 [0x7f6e7d675b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:46.732 [0x7f6e7d675b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:47.034 [0x7f6e7e676b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:47.034 [0x7f6e7e676b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:47.321 [0x7f6e7d675b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:47.322 [0x7f6e7d675b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:47.493 [0x7f6e7e653b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:47.493 [0x7f6e7e653b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:47.776 [0x7f6e7daaab38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:47.777 [0x7f6e7daaab38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error Jun 10, 2022 07:07:48.092 [0x7f6e7d675b38] Error — SQLITE3:0x80000001, 6410, statement aborts at 40: [select distinct metadata_items.id as ‘id’, parents.id as ‘parent_id’, grandparents.id as ‘grandparent_id’, metadata_items.added_at as ‘added_at’, metadata_items.library_section_id as ’ Jun 10, 2022 07:07:48.092 [0x7f6e7d675b38] Error — Got exception from request handler: sqlite3_statement_backend::loadRS: disk I/O error

I have run a database check as per Plex official restoring database page and the database comes back as, “ok”.

When browsing through the two libraries “Library” page, everything looks good, but I do get more errors as follows;

Jun 10, 2022 07:26:22.596 [0x7fd3e55f4b38] Error — Unknown metadata type: folder
Jun 10, 2022 07:26:22.612 [0x7fd3e5eaab38] Error — Unknown metadata type: folder

Its so frustrating.

Any help is appreciated.

Please attach the full ZIP / log file so I can see it.
It’s not posible to debug from a snippet.

What I can see looks like you have Disk I/O errors (hardware problems)

When I try to download logs, I get;

500 Internal Server Error

Here they are manually zipped.

Plex Tuner Service.zip (625.9 KB)

You have Permission Denied on the directory you mapped /tmp to.

Jun 10, 2022 08:01:53.880 [0x7f76cba3eb38] DEBUG - Request: [92.232.67.172:62683 (WAN)] GET /diagnostics/logs (14 live) TLS GZIP Signed-in Token (JL94x4) (Microsoft Edge)
Jun 10, 2022 08:01:53.880 [0x7f76cba3eb38] DEBUG - Diagnostics: Building logfile zip
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Error creating directory "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f": Permission denied
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Error creating directory "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/PMS Plugin Logs": Permission denied
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/Plex Media Server.log": No such file or directory
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/Plex Tuner Service.log" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/Plex Tuner Service.log": No such file or directory
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.fanarttv.log" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/PMS Plugin Logs/com.plexapp.agents.fanarttv.log": No such file or directory
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.1" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.1": No such file or directory
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.2" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.2": No such file or directory
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.3" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.3": No such file or directory
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.4" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.4": No such file or directory
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.5" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/PMS Plugin Logs/com.plexapp.agents.fanarttv.log.5": No such file or directory
Jun 10, 2022 08:01:53.881 [0x7f76cba3eb38] ERROR - Couldn't copy file "/config/Library/Application Support/Plex Media Server/Logs/PMS Plugin Logs/com.plexapp.agents.htbackdrops.log" to "/tmp/tempLogsa7c7f339-894d-4f53-83d6-56f3fe671c7f/PMS Plugin Logs/com.plexapp.agents.htbackdrops.log": No such file or directory

Heres my docker run command, im not sure where that is.

docker run
-d
–name plex
-p 32400:32400/tcp
-p 3005:3005/tcp
-p 8324:8324/tcp
-p 32469:32469/tcp
-p 1900:1900/udp
-p 32410:32410/udp
-p 32412:32412/udp
-p 32413:32413/udp
-p 32414:32414/udp
–sysctl net.ipv4.tcp_window_scaling=1
–sysctl net.ipv4.tcp_timestamps=1
–sysctl net.ipv4.tcp_sack=1
–sysctl net.ipv4.tcp_no_metrics_save=0
–sysctl net.ipv4.tcp_rmem=“4096 1048576 22020096”
–sysctl net.ipv4.tcp_wmem=“4096 1048576 22020096”
–sysctl net.ipv4.tcp_congestion_control=bbr
–sysctl net.ipv4.tcp_slow_start_after_idle=0
-e TZ=“Europe/London”
-e PLEX_CLAIM=“token”
-e CHANGE_CONFIG_DIR_OWNERSHIP=false
-e ADVERTISE_IP=“http://myip:32400/
-h jumbo.stream
-v /home/plex/plexmediaserver:/config
-v /home/plex/transcode/temp:/transcode
-v /home/plex/mounts/secret:/var/lib/plexmediaserver/Library/secret
plexinc/pms-docker:plexpass