Can you rebuild your library without losing watched status?

I’ve been having lots of issues with my dashboard displaying the “There was an unexpected error loading the dashboard” error message. I’m pretty sure my Plex library database is corrupted and needs to be rebuilt.

My question is, will this also delete the watched status of my movie/tv collection?

@“Brett Laurance” said:
I’m pretty sure my Plex library database is corrupted and needs to be rebuilt.
My question is, will this also delete the watched status of my movie/tv collection?

Yes. If you erase Plex’s database file, then everything gets erased.

But before taking such a drastic measure, why don’t you try to repair the database file?

Preface: when the database gets corrupt, there is most of the times a reason for it.
Did you move the plex datafolder onto an unreliable storage, like a network share or an external drive with a wonky connector?
I recommend you first remove such a source of trouble before attempting any repair.

https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database
The repair guide has 4 commands to be issued on a command line.

There are updates to the 4 commands, to deal with changed behaviour of the SQlite application in newer versions:

OSX
---
sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db "PRAGMA integrity_check"

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db .dump > dump.sql

mv ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db.original

sqlite3 ~/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db < dump.sql
Windows
-------
sqlite3 "%LocalAppData%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db" "PRAGMA integrity_check"

sqlite3 "%LocalAppData%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db" .dump > dump.sql

rename  "%LocalAppData%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db" com.plexapp.plugins.library.db.original

sqlite3 "%LocalAppData%\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db" < dump.sql

If you previously moved the Plex data folder to a different location than the default, replace %LocalAppData% with the actual parent directory path.

Linux
-----
sqlite3 "$PLEX_HOME/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"  "PRAGMA integrity_check"

sqlite3 "$PLEX_HOME/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" .dump > dump.sql

mv  "$PLEX_HOME/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" "$PLEX_HOME/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db.original"

sqlite3 "$PLEX_HOME/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db" < dump.sql

Thanks for the response. I actually did follow the steps you posted a few weeks ago. It didn’t seem to have made any difference in my case. I’d rather not rebuild, but I’m running out of ideas at this point.

What is your server platform?

I’m running a Synology 412+ NAS with DSM 5.2.

Have you asked in the Synology subforum? The experts there might have one or two additonal things to try before you flatten your installation.

OR you can use trakt.tv to keep track of your watched status, even between plex servers, and even after a database wipe.

Use the tract.tv plugin been doing it for years haven’t lost a play count for my primary account in years

Anyone know how to do this on an unraid server?
Is tract.tv the only option if the repair does not work?
I have started getting media that does not properly get the metadata and crashes when selected (I have removed, scanned, emptied trash, cleaned bundles, then copied files back all with the same results).
I have a feeling a library rebuild (fresh media scan and fresh metadata) will fix it, but I do not want to lose the watched history for all my families profiles.
I am on the fence about tract.tv due to their privacy policies…