# Paths-Command to SSH from Mac Terminal

**URL:** https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749
**Category:** Plex Media Server
**Tags:** server-synology
**Created:** [January 19, 2025, 2:37am UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749 "2025-01-19T02:37:13Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Ed.K](https://avatars.discourse-cdn.com/v4/letter/e/dfb087/32.png) [@Ed.K](https://forums.plex.tv/u/Ed.K)
#### Post date: [January 19, 2025, 2:37am UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/1 "2025-01-19T02:37:13Z")

</div>

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/repair-a-corrupted-database/)  
[https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/)

TX

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [January 19, 2025, 4:00am UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/2 "2025-01-19T04:00:58Z")

</div>

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

> **[GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server...](https://github.com/ChuckPa/PlexDBRepair)**
>
> Database repair utility for Plex Media Server databases

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

---

<div class="post-metadata">

### Author: ![Ed.K](https://avatars.discourse-cdn.com/v4/letter/e/dfb087/32.png) [@Ed.K](https://forums.plex.tv/u/Ed.K)
#### Post date: [January 19, 2025, 6:30am UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/3 "2025-01-19T06:30:57Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [January 19, 2025, 6:32am UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/4 "2025-01-19T06:32:34Z")

</div>

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

If I may recommend:

```auto
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.

---

<div class="post-metadata">

### Author: ![Ed.K](https://avatars.discourse-cdn.com/v4/letter/e/dfb087/32.png) [@Ed.K](https://forums.plex.tv/u/Ed.K)
#### Post date: [January 19, 2025, 6:18pm UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/5 "2025-01-19T18:18:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [January 19, 2025, 6:49pm UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/6 "2025-01-19T18:49:54Z")

</div>

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 😉

---

<div class="post-metadata">

### Author: ![Ed.K](https://avatars.discourse-cdn.com/v4/letter/e/dfb087/32.png) [@Ed.K](https://forums.plex.tv/u/Ed.K)
#### Post date: [January 19, 2025, 7:23pm UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/7 "2025-01-19T19:23:39Z")

</div>

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. 😉

**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.

---

<div class="post-metadata">

### Author: ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)
#### Post date: [January 19, 2025, 8:42pm UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/8 "2025-01-19T20:42:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Ed.K](https://avatars.discourse-cdn.com/v4/letter/e/dfb087/32.png) [@Ed.K](https://forums.plex.tv/u/Ed.K)
#### Post date: [January 20, 2025, 6:56am UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/9 "2025-01-20T06:56:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [April 20, 2025, 6:56am UTC](https://forums.plex.tv/t/paths-command-to-ssh-from-mac-terminal/902749/10 "2025-04-20T06:56:13Z")

</div>

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