Versus the past versions, the addition of the ‘automatic’ mode is much better I think, less easy for people to get confused and make the steps in the wrong order. Plus for me, the database is 1.7gb so takes quite some time between steps to do manually.
The only issue I have found is that the new produced database files are set to ‘read only’ by default, so I need to manually change that with CHMOD after running the tool. I don’t have a problem with command line in Windows but always need to Google how to do things in Linux as I would only do this type of maintenance a few times per year. I am not sure if that permissions issue is coming from the Docker setup, or the tool itself.
I think the tool is critical based on the decision to use this “internal” version of SQLite in Plex since some time, which makes such database tasks prohibitively difficult for normal users (perhaps not such a bad thing :-)).
Hi ! Hi have a problem with repair function, always same problem:
Exporting current databases using timestamp: 2023-03-15_12.26.29
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 11251: 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-03-15_12.26.29'
Cannot continue.
Do you have an idea ? I am in a container already stopped
Meanwhile, as I torment the Windows version of Plex, I’m periodically running the Windows.bat version of this. It’s working well, I think, though I’m now not sure which version I’m running!
This stuff Output "Unexpected EOF / End of command line options, Exiting" is getting outputted but you could be adding stuff to the tool so looks like a error catch condition which is why I deleted previous post.
[/tmp] # ./DBRepair.sh stop auto start
Plex Media Server Database Repair Utility (QNAP)
Version v1.0.3
[2023-03-29 04.06.20] Stopping PMS.
[2023-03-29 04.06.20] Stopped PMS.
[2023-03-29 04.06.20] Automatic Check,Repair,Index started.
[2023-03-29 04.06.20]
[2023-03-29 04.06.20] Checking the PMS databases
[2023-03-29 04.06.26] Check complete. PMS main database is OK.
[2023-03-29 04.06.26] Check complete. PMS blobs database is OK.
[2023-03-29 04.06.26]
[2023-03-29 04.06.26] Exporting current databases using timestamp: 2023-03-29_04.06.20
[2023-03-29 04.06.26] Exporting Main DB
[2023-03-29 04.06.37] Exporting Blobs DB
[2023-03-29 04.06.41] Successfully exported the main and blobs databases. Proceeding to import into new databases.
[2023-03-29 04.06.41] Importing Main DB.
[2023-03-29 04.07.13] Importing Blobs DB.
[2023-03-29 04.07.13] Successfully imported databases.
[2023-03-29 04.07.13] Verifying databases integrity after importing.
[2023-03-29 04.07.19] Verification complete. PMS main database is OK.
[2023-03-29 04.07.20] Verification complete. PMS blobs database is OK.
[2023-03-29 04.07.20] Saving current databases with '-BACKUP-2023-03-29_04.06.20'
[2023-03-29 04.07.20] Making repaired databases active
[2023-03-29 04.07.20] Repair complete. Please check your library settings and contents for completeness.
[2023-03-29 04.07.20] Recommend: Scan Files and Refresh all metadata for each library section.
[2023-03-29 04.07.20]
[2023-03-29 04.07.20] Backing up of databases
[2023-03-29 04.07.20] Backup current databases with '-BACKUP-2023-03-29_04.07.20' timestamp.
[2023-03-29 04.07.20] Reindexing main database
[2023-03-29 04.07.26] Reindexing main database successful.
[2023-03-29 04.07.26] Reindexing blobs database
[2023-03-29 04.07.26] Reindexing blobs database successful.
[2023-03-29 04.07.26] Reindex complete.
[2023-03-29 04.07.26] Automatic Check, Repair/optimize, & Index successful.
[2023-03-29 04.07.26] Starting PMS.
[2023-03-29 04.07.32] Started PMS
[2023-03-29 04.07.32] Unexpected EOF / End of command line options, Exiting
[/tmp] #