Can't transfer play history to new server

Server Version#:
Player Version#:

I have followed the instructions in support document: https://support.plex.tv/articles/201370363-move-an-install-to-another-system but I still cannot see any play history on the new server. I have copied the whole of the plex media server contents (except cache) from appdata on the old server and I have exported the registry entry and imported it onto the new sever.

I have restarted the system and edited the libraries but still no play history.

Please tell me what I am doing wrong. Thanks.

You have probably copied the data while either the old or the new or both servers were still running. This ensures that the copied database is incomplete/damaged.

No, I ensured that both servers were stopped.

Now that the scan has finished, I have also found that all the mismatched items which I had corrected on the old server have lost the corrections and need to be individually reset again. When it comes the music library this is a very large number to correct.

Have you made sure to keep all drive letters and folder names the same, on the old vs. new server? If you didn’t, this is kinda expected.
It would also partly explain why the playback status didn’t transfer as expected.
When you transfer the server database, all media must be available in the same location as before. i.e. a new library scan shouldn’t even be necessary.

All the media is on a NAS drive and I thought I had accessed all folders at the same network drive letter but when I checked I had 2 of them interchanged. I have corrected that and I am waiting for the scan to complete again.

That won’t be sufficient. The damage is already done. You’d need to copy over the data from the old server again.

Alternatively, restore an old database from before the first scan on the new server. https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

OK, I can do that easily as I transferred it all in a .rar file

Then you have destroyed all symbolic links which existed in the old plex data folder. This will reset at least all manual poster selections. Probably other things as well.

A direct file copy would have been safer.

OK I’ll try that instead but I am guessing that it will be a long process over the network

If most of the files and folders are already existing in the target location, it can be significantly faster.

comand line tool
robocopy "J:\plexdata" "V:\plexdata" /MIR
(substitute “J:\plexdata” with the source, and “V:\plexdata” with the target folders on your particular system. And don’t swap target and source! :wink: )

Trying that now

That appeared complete successfully but now I get message “Plex Media Server was unable to open its media database”

If the Windows installation is made fresh (instead of cloning the old one), the Windows user IDs are different now. But the copied files still carry the permissions of the old windows installation.
Which means that you’ll have to reset the access permissions of all files, folders and subfolders of the new Plex data folder back to the defaults. (So that the Windows user account under which Plex server is supposed to run has full access permissions).

While this can be achieved with the regular Windows file and folder properties, it is tedious and error-prone. Here is a handy tool to simplify the process: Resetting NTFS files permission in Windows – Graphical Utility – lallous' lab

I have run that utility and reset all files but I still get the same message when starting PMS. The message is headed “corrupt database” do I need to copy it across again? If so, which file is it? I assume that I would then need to reset it again.

Instead of copying anew, try using one of the backups. https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

Also check the registry. Do you have a field for the appdata folder location? If you previously used the default than this would be blank and the new server would continue to use the default. However, if you manually entered the location or had a custom location, then the new install will still look for this location. The user folder may be incorrect so it won’t the database.

I am not sure what you mean MovieFan. I initially transferred the registry data and all the files but used a .rar extract to reduce the time taken for the copy. That all worked fine except that there was no play history transferred.

Otto suggested using robocopy and then resetting ownership of the files. That’s when database problem arose. I assume as the previous copy worked with the registry update that the problem is not the registry.

Otto’s last suggestion may have resolved the issue but I am not certain. The restored database now works fine. PMS starts on the new server and all the libraries are present and intact. As far as I can tell all the media is still recognised with just a few posters lost (but that seems to happen quite often during normal operation).

I checked the play history on a couple of series. The last played episode of the series seems to be in the play history but nothing before that. I am sure that selecting the “view play history” of a series used to show all the episodes which have been played. I tried the same operation on the previous server but I get “nothing to see” which is even stranger as it knows the episodes which have been played.

I then checked a series on both servers where I had not yet deleted the watched files. All of the played episodes were listed. So I put a dummy file with an early episode name into a series where the watched episodes had been deleted and then play history then only shows the dummy watched file I added. If I delete it again I then get “nothing to see”, not even the last episode watched which was previous shown. This all seems very odd.

I can’t remember how to view the entire play history of the server (I know you only get recent viewings per page but at least I could see how much play history is present). I can’t find how to do that in the support pages either, please can you remind me.

I think I have discovered an anomaly in the way the browser app displays the play history.

Previously I have always looked at the play history of a particular series (season in US) by clicking on the 3 dots in the icon for that series. It used to show which episodes had been played. It now shows “nothing to see here”.

However, if you click on the 3 dots next to the title of the show and select play history it displays the entire history for that show including every episode in every series watched.

Is this the way it is supposed to work?