Plex Server won't update

Server Version#: Version 1.30.2.6563-3d4dc0cce
Player Version#: Version 1.31.0.6654

Plex Media Server Logs_2023-02-11_13-37-24.zip (3.8 MB)

Hi i’ve updated Plex multiple times over the last 2 months and my library no longer updated. I’ve attached the logs. please help if possible.

fairly obvious via the logs, but you have a corrupt database.

Feb 11, 2023 13:20:07.734 [0x700007e00000] ERROR - Failed to commit transaction (/data/jenkins/server/1780683711/Library/MetadataItem.cpp:1101) (tries=1): Cannot commit transaction. database disk image is malformed

I would recommend GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases

Thanks. I’ll give it a go.

I’ve copied the PlexDBRepair-0.6.5.tar.gz file to the downloads folder.

Executed the following:

To launch from the command line on MacOS (on the administrator account)

        osascript -e 'quit app "Plex Media Server"'
        cd ~/Downloads
        tar xvf PlexDBRepai PlexDBRepair-0.6.1.tar.gz
        cd PlexDBRepai PlexDBRepair-0.6.1

        chmod +x DBRepair.sh
        ./DBRepair.sh


Get to the 3rd line of instructions and get this in terminal:

Last login: Tue Feb 14 13:57:09 on ttys000
lucashboyle@Lucass-iMac ~ % osascript -e 'quit app "Plex Media Server"'
lucashboyle@Lucass-iMac ~ % cd ~/Downloads
lucashboyle@Lucass-iMac Downloads % tar xvf PlexDBRepai PlexDBRepair-0.6.1.tar.gz
tar: Error opening archive: Failed to open 'PlexDBRepai'
lucashboyle@Lucass-iMac Downloads %

Replace 6.1 with 6.5 (Chuck bumped the version number up without updating the instructions)

tar xvf PlexDBRepai PlexDBRepair-0.6.5.tar.gz

Thanks. So I’ve replaced that line (copied and pasted your line just to be sure.) Getting the following:

Last login: Tue Feb 14 14:21:09 on ttys000
lucashboyle@Lucass-iMac ~ % osascript -e ‘quit app “Plex Media Server”’
lucashboyle@Lucass-iMac ~ % cd ~/Downloads
lucashboyle@Lucass-iMac Downloads % tar xvf PlexDBRepai PlexDBRepair-0.6.5.tar.gz
tar: Error opening archive: Failed to open ‘PlexDBRepai’
lucashboyle@Lucass-iMac Downloads %

tar xvf PlexDBRepair-0.6.5.tar.gz

EDIT: You can download the utility directly - no tar/gzip/etc required.

Go to: https://github.com/ChuckPa/PlexDBRepair/releases/tag/v0.6.5

Click on DBRepair.sh.

It should download.

Thanks.

Attempted option 4. I guess it’s looking like i need to start again. Also what is the most common causes for the library to get “damaged”.

Enter choice: 4

Exporting current databases using timestamp: 2023-02-14_15.36.28
Export: (main)…(blobs)…done.
Successfully exported the main and blobs databases. Proceeding to import into new databases.
Import: (main)…Error: near line 863864: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863865: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863866: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863867: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863868: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863869: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863870: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863871: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863872: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error 1 from Plex SQLite while importing from ‘./dbtmp/library.plexapp.sql-2023-02-14_15.36.28’
Cannot continue.

Look at Option A under Typical Usage.

You can try restoring from an available database backup (configured in Settings → Scheduled Tasks → Backup database every three days).

If successful, you will not have to re-create your libraries, reshare with friends, etc. You will need to re-scan your libraries to pick up any changes since the backup occurred.

Thanks, so “Option A under typical usage.” Is that in the PLexDBRepair or in the Plex server app?

I see in the DBRepair tool there is “replace current database with newest backup copy”?

In the PlexDBRepair readme: GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases

That’s it.

I guess starting again is in order…

Enter choice: 5

Checking the PMS databases
Check complete. PMS main database is damaged.
Check complete. PMS blobs database is OK.
Database is damaged and no backups avaiable.
Only available option is Repair.

Enter choice: 4

Exporting current databases using timestamp: 2023-02-14_16.11.32
Export: (main)…(blobs)…done.
Successfully exported the main and blobs databases. Proceeding to import into new databases.
Import: (main)…Error: near line 863864: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863865: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863866: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863867: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863868: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863869: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863870: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863871: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error: near line 863872: UNIQUE constraint failed: fts4_metadata_titles_icu_segdir.level, fts4_metadata_titles_icu_segdir.idx
Error 1 from Plex SQLite while importing from ‘./dbtmp/library.plexapp.sql-2023-02-14_16.11.32’
Cannot continue.

I’m afraid so. The current and all backups are damaged and cannot be repaired.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.