Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Plex DB Corrupted - PlexDBRepair failing

Featured Replies

Hi board.. changed my graphics card then started getting DB errors in plex 

<Response code="503" title="Maintenance" status="Plex Media Server is currently running database migrations."/>

loaded up PlexDBRepair and tried the automatic repair option and got 

 

Enter command # -or- command name (4 char min) : 2
 
Automatic Check,Repair,Index started.

Checking the PMS databases
Check complete.  PMS main database is damaged.
Check complete.  PMS blobs database is OK.

Exporting current databases using timestamp: 2024-07-12_20.20.31
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases.
Start importing into new databases.
Importing Main DB.
Runtime error near line 491037: UNIQUE constraint failed: media_streams.id (19)
Error 1 from Plex SQLite while importing from './dbtmp/library.plexapp.sql-2024-07-12_20.20.31'
Cannot continue.
Repair failed. Automatic mode cannot continue. Please repair with individual commands

so then ran option 5 

Enter command # -or- command name (4 char min) : 5
 
Exporting current databases using timestamp: 2024-07-12_20.22.41
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases.
Start importing into new databases.
Importing Main DB.
Runtime error near line 491037: UNIQUE constraint failed: media_streams.id (19)
Error 1 from Plex SQLite while importing from './dbtmp/library.plexapp.sql-2024-07-12_20.22.41'
Cannot continue.

 

but still no go.. any recommendations? 

 

  • Author

found the DBRepair log

DBRepair.log

I'm having the same issue

15 hours ago, ToXIc said:

Hi board.. changed my graphics card then started getting DB errors in plex 

<Response code="503" title="Maintenance" status="Plex Media Server is currently running database migrations."/>

loaded up PlexDBRepair and tried the automatic repair option and got 

 

Enter command # -or- command name (4 char min) : 2
 
Automatic Check,Repair,Index started.

Checking the PMS databases
Check complete.  PMS main database is damaged.
Check complete.  PMS blobs database is OK.

Exporting current databases using timestamp: 2024-07-12_20.20.31
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases.
Start importing into new databases.
Importing Main DB.
Runtime error near line 491037: UNIQUE constraint failed: media_streams.id (19)
Error 1 from Plex SQLite while importing from './dbtmp/library.plexapp.sql-2024-07-12_20.20.31'
Cannot continue.
Repair failed. Automatic mode cannot continue. Please repair with individual commands

so then ran option 5 

Enter command # -or- command name (4 char min) : 5
 
Exporting current databases using timestamp: 2024-07-12_20.22.41
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases.
Start importing into new databases.
Importing Main DB.
Runtime error near line 491037: UNIQUE constraint failed: media_streams.id (19)
Error 1 from Plex SQLite while importing from './dbtmp/library.plexapp.sql-2024-07-12_20.22.41'
Cannot continue.

 

but still no go.. any recommendations? 

 

To be clear I have no idea what I'm doing but using the ignore command worked for me. Its mentioned in this thread https://github.com/ChuckPa/PlexDBRepair/issues/141

  • Author
45 minutes ago, bobdole199534 said:

To be clear I have no idea what I'm doing but using the ignore command worked for me. Its mentioned in this thread https://github.com/ChuckPa/PlexDBRepair/issues/141

unfortunately that didnt help 

 

looked at the docker logs and this is just scrolling 

Stopping Plex Media Server.
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Starting Plex Media Server.
Error: Unable to set up server: sqlite3_statement_backend::prepare: no such table: schema_migrations for SQL: select version from schema_migrations order by version (N4soci10soci_errorE)
Stopping Plex Media Server.
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
 

  • Author

eneded up blowing away the container. now to figure out when container to switch to.. i was using the official ver.. 

should i use linuxservers' or binhex's plexpass since i have to pass and gpu. 

also anyone have a link to mod plex to add by file date and not add by date added to plex? 

I have Plex pass and GPU and went with Linux server.

  • Author

thanks 

 

  • 5 months later...

Hey all - the solution for anyone else who finds it that was also having this problem is to first toggle ignore to on. So, "stop" then "ignore" then "auto." Took a while, but worked like a charm. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.