I coulda’ told ya that!
![]()
All good.
![]()
back up and running ?
Any chance you can update DBRepair-Windows.ps1 with this fix for us Windows users? ![]()
Thank you for the hard work you put into this.
I have asked Dan (the user who maintains the Windows PS1 version to look into it.
What little I know of Windows, A modification to the BAT file should be this.
( Line 97 )
echo %time% -- Deleting records
"%PlexSQL%" "%PlexData%\com.plexapp.plugins.library.db" "DELETE from statistics_bandwidth where account_id is NULL;"
It can take a few minutes for this to run (bloat, CPU, and whether SSD/HDD dependent)
Make 100% certain PMS is stopped.
My plex database is now so large that I haven’t enough space on my mac mini to make an automatic action of DBRepair now (I have the error message : not enough space) . Could you help me ?
When you look in the Databases folder/directory, is there at lease one database backup you could delete or move elsewhere for now ?
If so, move it / them for now. Any backups of the bloated DBs should be discarded unless that’s all you have. In this case, move the backups so you have space again.
Next, run the script and let it do the cleanup. Be advised, if your DB is extremely large, it might take a few hours. ( reports vary from minutes to hours )
I can see that on plex database directory :
Would you be OK with deleting this database and using the backup?
All you would need to do, after deleting and switching files, is to Scan Files and Refresh Metadata to make it current again.
Your last backup is May 15. (which was some time ago).
We would be resetting your PMS to that date.
NOTE You can safely delete the contents of dbtmp. This should be done after every DBRepair run to avoid wasting space.
It took me a long time but I did all tasks you suggest (use the db backup, scan files, refresh metadata). My database is now 780 M after automatic DB Repair, coming from 61,55 Go ! Everything is fluid. Thanks a lot for your help.
Now that you’ve recovered, you can delete the bloated DB copies / backups if you wish then make a backup of the current ones.
Done. Thanks a lot
Worked like a charm with plex docker. The automated session reduced the DB from 50GB to 50 MB and took about 48 hours on a slower HDD.
I couldn’t find any link to buy you a coffee, let me know, if there’s a way
Best
Could be wrong but always thought that belonged to Plex for Mac for me.
After restart it just repopulated In application support.
On DSM 6, we used the Plex shared folder.
When DSM 7 came out, we were forced to change
plex → System Internal User PlexMediaServerPlex → Shared Folder PlexMediaServerWhen you first installed / upgraded PMS after upgrading to DSM 7,
it was supposed to bring over your entire DSM 6 server’s internal contents
(this is what normally lives in Library/Application Support/Plex Media Server) so you didn’t lose any server data.
If that didn’t happen and you had to start over (all of DSM 6 was abandoned)
then
Plex can be deletedPlex can be deleted (or minimally cleaned out) unless you have a use for it.exact, I delete it and post to Synology
clear. I do that. thanks a lot
Try now to use DB Repair on my Plex Server running on Synology 1019+ with DSM7.
I follow instructions :
Install the rar file in Plex Media Server folder
then terminal with my mac :
cd /volume1/PlexMediaServer
sudo bash
bash-4.4# tar xf DBRepair-1.11.00.tar.gz
tar: DBRepair-1.11.00.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
So I have an error
Could you help me ?
.gz means the file is compressed.
Try tar xzf DBRepair-1.11.00.tar.gz
The z flag tells tar to uncompress with gzip.
If that does not work:
Login to the Syno via SSH.
# change to the PlexMediaServer directory
cd /volume1/PlexMediaServer
# download DBRepair.sh, -O means overwrite an existing file if one is present.
sudo wget -O DBRepair.sh https://github.com/ChuckPa/DBRepair/releases/latest/download/DBRepair.sh
# make it executable
sudo chmod a+x DBRepair.sh
# run it
sudo ./DBRepair.sh
Worked fine with the second scenario. Automatic DBRepair done. everything is fluid. Many thanks for your help.