Paths-Command to SSH from Mac Terminal

Server Version#: v.1.41.3.9314-a0bfb8370
Synology DSM 7.2.2 (DS423+) - Things running ‘OK’
Command Line Question (new to this part :))
All default installation
any suggestions to my path or command typing
Trying to run PRAGMA integrity_check.

Why? Doing initial poking to see why, for Blue Bloods only, playing newly recorded TV (stored in 1 folder) keeps playing old S01E01 from DVD (originals in another folder).

I typed and got to here OK:
root@servername:/volume1/PlexMediaServer/AppData/Plex Media Server/Plug-in Support/Databases#

from that location showing, I typed in this:
“/var/packages/PlexMediaServer/target/Plex SQLite” com.plexapp.plugins.library.db

I get error:
-ash: “/var/packages/PlexMediaServer/target/Plex: No such file or directory

I referenced these sites but I am obviously ‘interpreting things wrong’.

https://support.plex.tv/articles/repair-a-corrupted-database/
https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/

TX

May I offer a suggestion to make your life easier?

  1. Download this and put it in the top of /volume1/PlexMediaServer
    – It won’t cause problems and I won’t complain/bite if you do. LOL
  1. SSH into the Syno and get to /volume*/PlexMediaServer
  2. Unzip it / extract from the tar ball
  3. Get into the directory where it unzip/untar’d
  4. give it Execute permission ( sudo chmod +x DBRepair.sh )
  5. Run it. sudo ./DBRepair.sh
  6. Now you have all those tools, plus a few more, at your disposal

See the README.md file for instructions

Easier is good. Cool.l this looks pretty robust. Will give its go. Seems to be a busy Plex watching evening at moment. Will try maybe tomorrow. Will have to google some to unzip. New to ssh.

SSH will do exactly what you tell it. that’s both good and bad.

If I may recommend:

sudo ./DBRepair.sh   stop auto start exit

This will stop PMS, run automatic check-optimization-reindex, then start PMS and lastly exit from the tool.

Reading github notes. OMG Agent 99, flashes of memory. Hilarious.

nube question: do I download from green ‘<> code’ button or further down it says ‘downloads@latest’?

BTW - LOL May I recommend… sounds like pairing a cheeky little cabernet with the meal.

If you go to GitHub,

You can drown the “latest” which will give you the README, ReleaseNotes, and DBRepair

-or-

you can grab the DBRepair.sh that you see there. You get the same thing.

There is another reference there for those who are old enough :wink:

All seems OK in ‘auto’ scan. see below. It was worth a try. Thanks a bunch.

It is only on the Samsung TV Plex app that I have a problem. It shows and plays fine on Apple stuff so i watch it there. Blue Bloods doesn’t even show in Samsung Plex App ‘DVR Recordings’ but if I sort by ‘folder’ it shows. I still can’t play things there without Plex hopping back to play S01E01. I have tried deleting the whole thing and putting it back tohave it rescan etc. no SOAP.

I will go hunt for the other reference. :wink:

from terminal:
Automatic Check,Repair,Index started.

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

Exporting current databases using timestamp: 2025-01-19_11.53.33
Exporting Main DB
Exporting Blobs DB
Successfully exported the main and blobs databases.
Start importing into new databases.
Importing Main DB.
Importing Blobs DB.
Successfully imported databases.
Verifying databases integrity after importing.
Verification complete. PMS main database is OK.
Verification complete. PMS blobs database is OK.
Saving current databases with ‘-BACKUP-2025-01-19_11.53.33’
Making repaired databases active
Repair complete. Please check your library settings and contents for completeness.
Recommend: Scan Files and Refresh all metadata for each library section.

Backing up of databases
Backup current databases with ‘-BACKUP-2025-01-19_11.58.38’ timestamp.
Reindexing main database
Reindexing main database successful.
Reindexing blobs database
Reindexing blobs database successful.
Reindex complete.
Automatic Check, Repair/optimize, & Index successful.

Now that the DBs are resequenced and repacked that you’ve got improved performance.

Depending on the number of indexed items & how fragmented it was, the improvement can be from minimal to profound.

The biggest improvement is usually manifested when searching

If BlueBloods isn’t showing as it should, check the naming and permissions. Something is not right there.

excellent - you are right. it is zippier. thanks. big smiles here.

Ya looked again:

Permissions - That folder has the same permissions as everything else but to be sure I went to the root of my media folder and and re-ran ownership and permissions (incl sub-folders) to be sure.

Naming - handled by the Plex DVR so I hope its right :). It seems to match Plex’s support article. Blue Bloods (2010) - S13E11…

The darndest thing. It is only bad on Samsung Plex app. Maybe there is a worldwide cone of silence.

Ed

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