Let me get in sync please?
What happened to your recent backups?
Youāre showing backups which are from 2022 and 2021
You turned the option OFF in PMS?

I donāt understand either. Plex 6973 shows backups turned ON, every 3 days. The location is correct. I donāt know what happened there. nothing catastrophic has happened to the NAS, no disk changes, nothing.

However, unknown to me, why there are so many more folder names in that path.
The whole thing is: /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Plug-in Support/Databases
I can give you a modification to the DBRepair.sh script which will IGNORE the import errors.
Itās one way to try and recover what you have.
Be advised, the UNIQUE CONSTRAINT error is because everything should have a unique ID number (in the indexes)
Letās try this ā REINDEX the DBās first.
AKA: Check (you know theyāre bad) - Reindex (which checks again after indexing)
Ok, I assume using dbrepair for all of this. Should I install 7210 first, or just run dbrepair now?
DBRepair is completely independent of PMS.
It only looks at the file structure of the DB.
PMS concerns itself with the contents. DBRepair isnāt sophisticated enough to validate every record in the DB.
Go ahead and run the Reindex now
Sorry, not trying to be thickheaded here, reindex using dbrepair?
Yes.
- Stop PMS (if running)
- Reindex (it will check both databases after reindexing)
- Start PMS if everything passes and evaluate
Ran reindex, PMS db is damaged, blobs ok.
Want me to give you a modification to the script to try and circumvent the problem?
We can tell it to ignore the error code.
( It will drop - not import - those records which fail the constraint check )
It will mean youāll need to Refresh All Metadata when done
Iāll run whatever you think could help. Iām up for anything before the nuke option is the only way. And my deepest gratitude for helping, by the way.
While I prep instructions, Please install the Synology text editor app.
The Synology text editor is how to safely edit the script (plus itās easy)
Have never run it, but itās now installed.
DBRepair is opened.
EXIT from DBRepair.sh (in the shell, if you have that open)
Open FileStation and navigate to where you have DBRepair.sh installed.
Right-click DBRepair.sh ā Open with Text Editor
insert
here
Depending on the version you have. (should be v1.0.8)
Line: 860: Result=$?
Change: Result=0
Line 871: Result=$?
Change: Result=0
Line 896: Fail=1
Change: Fail=0
Line 908: Fail=1
Change: Fail=0
SAVE the file (upper left menu bar)
Now restart DBRepair.sh in your shell window.
Perform a normal repair.
- It will complain about the Unique Constraint
- It will bark other errors
- It will keep going
- It will make the repaired (attempted) DBs active.
Running now.
While thatās running, after this is done, should the backup path be that long? Iām an old DOS and (light) C++ guy, I donāt see any path separators, which that path I posted is what is in the plex backup path field. Something to fix later?
Linux paths are / based.
Windows uses \ (Microsoft wanted to be different then Unix and the rest of the world)
Ok. I guess all that pre path stuff is something hidden normally. Just wondering where my backups went, as that exact path doesnāt exist in file explorer.
DBRepair just flipped to importing. Still running.
Iām getting ahead, I know, but Iām thinking you want me to initially run up plex 7210 whenever this gets started again?
Still running, just kicked up those 4 errorsā¦
Exporting current databases using timestamp: 2023-06-24_21.28.03
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases. Proceeding to import into new databases.
Importing Main DB.
Runtime error near line 2379416: UNIQUE constraint failed: statistics_media.id (19)
Runtime error near line 2379417: UNIQUE constraint failed: statistics_media.id (19)
Runtime error near line 2379418: UNIQUE constraint failed: statistics_media.id (19)
Runtime error near line 2379419: UNIQUE constraint failed: statistics_media.id (19)
Importing Blobs DB.
Successfully imported databases.
Verifying databases integrity after importing.
Start PMS and see what you have.
Weāve told it to fix the structure and make Lemonade as best it can
data is likely missing. Scan & Refresh are URGED ![]()

