ChuckPa/PlexDBRepair

Error repairing database

Closed this issue ยท 3 comments

Seems to be the same issue as #48, but apparently I have no valid backups ๐Ÿ˜ฌ

Exporting current databases using timestamp: 2023-10-08_10.56.59
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases. Proceeding to import into new databases.
Importing Main DB.
Importing Blobs DB.
Runtime error near line 49883: UNIQUE constraint failed: blobs.linked_type, blobs.linked_id, blobs.blob_type (19)
Error 1 from Plex SQLite while importing from './dbtmp/blobs.plexapp.sql-2023-10-08_10.56.59'
Cannot continue.

Could you add the modification mentioned in #48 to allow handling this situation?

Thanks

This happens when importing with deep damage

May I see a ls -la of the Databases directory and also know which UID & GID or username this was run as ?

Runtime error near line 49883: UNIQUE constraint failed: blobs.linked_type, blobs.linked_id, blobs.blob_type (19)
Error 1 from Plex SQLite while importing from './dbtmp/blobs.plexapp.sql-2023-10-08_10.56.59'

There is an option to ignore the constraint error.
Recommend:

  1. Make a backup copy of both main and blobs DB
  2. Invoke DBRepair.sh -i (the 'ignore' constraint error flag)
  3. Now run the repair.

Sure:
image

I'm running this in docker, so ran id to get the uid and gid:
image

DBRepair.sh -i seems to have done the trick though! Thanks!

Glad you got it.