FAQ 30 - DSM 7 - Database Repair using a Backup copy
The database can get corrupted for a variety of reasons. The most common are abrupt stopping of PMS (power fail, restart, etc)
When this happens, if there are database backups, we can recover by shuffling around the files using FileStation.
-
Stop PMS if running
-
Open FileStation
-
Navigate to PlexMediaServer / AppData / Plex Media Server / Plug-in Support / Databases.
-
Rename
com.plexapp.plugins.library.db
tocom.plexapp.plugins.library.db--BAD
-
Select the most appropriate backup copy of the database and copy it to the “Plug-in Support” folder.
-
Navigate up to “Plug-in Support” and rename to
com.plexapp.plug-ins.library.db
-
MOVE
com.plexapp.plugins.library.db
back into the Databases folder.
-
Cleanup
– REMOVEcom.plexapp.plugins.library.db-wal
if it exists
– REMOVEcom.plexapp.plugins.library.db-shm
if it exists -
Confirm everything back to normal.
-
Start Plex
-
Give EXTRA TIME for PMS to update the backup database (schema) if needed
-
When the CPU is normal again (might take 2-3-4 minutes)
– Scan files for each section
– Empty trash
– Clean bundles
– Optimize Database