DBRepair development

Well then

abolish
eliminate
expunge
obliterate
nullify
extirpate
expunge
efface
trim :wink:

Got it.

I hate it when I mix up " and

For your consideration -

DBRepair-v1.09.00-TEST.tar (110 KB)

If the affected files are limited to a certain time period (>24 hours old), any term implying a completeness in erasure seems inaccurate. “Trim”, “prune”, or “shave” would be better I feel.

1 Like

That’s why I thought ‘purge’ … nothing with a limit

“Prune” is already used for the controlled removal of transcoder cache files
(variable DBREPAIR_CACHEAGE as documented in the README.md)

The reason I make it wait 24 hours is because I want to be certain PMS does not need the files.

I like purge because it makes sense and because it sounds like it goes with prune. :slight_smile:

For what its worth Purge gets my vote. Its what GNOME call it also when you delete temp files so good to keep it consistent as its kinda doing the same thing …

Then, in the interest of uniformity with other apps, “PURGE” it is :slight_smile:

So is it working ok for everyone so far ?

1 Like

I ran it for Auto - which is what I typically use - and Prune. Didn’t have any issues on my QNAP; Prune just reported nothing found (which is what I expected really).

Edit: meant Purge, not Prune… :man_facepalming:

@Insomnic_1

Did you try the purge ?

Dangit… typed Prune but meant Purge… guess the alliteration didn’t help after all. :slight_smile:

I can’t help it if you can’t write :stuck_out_tongue: lol

It can be very quick. I just purged mine last night so there’s nothing to do.

[chuck@lizum PlexDBRepair.2014]$ sudo ./DBRepair.sh  stop purge start
 
 
 
      Plex Media Server Database Repair Utility (Ubuntu 22.04.5 LTS)
                       Version v1.09.00
 
 
[2024-11-08 13.35.47] Stopping PMS.
[2024-11-08 13.35.47] Stopped PMS.
 
[2024-11-08 13.35.47] Purging started.
[2024-11-08 13.35.47] Purging completed.
 
[2024-11-08 13.35.47] Starting PMS.
[2024-11-08 13.35.47] Started PMS
 
[chuck@lizum PlexDBRepair.2015]$ 
1 Like

Is v1.09.00 beta? Tried 88 in v1.07 and it returns
“Checking for update
No update available.”

@Tony_T

Not yet released so it’s here as beta / test

In this thread.

see above.

1 Like

ALL:

I am having second thoughts about two commands: Prune & Purge.

I’m considering merging the two:

  1. Prune will continue to work as written
  2. Purge will be merged into Prune with a preset age of 1 day.

Why have two commands when the second command does so little.

Thoughts?

2 Likes

Makes sense and seems like a good idea to me. :+1:

ALL:

I’ve put ‘prune’ and ‘purge’ together as one command ( PRUNE ).

Existing Prune functionality has not been changed

Purge will remove all temp files more than 1 day old.
(This ensures playback is not paused when the tool runs)

For your consideration:

DBRepair-v1.09b.tar (150 KB)

Folks:

One last update to finish the year. :sunglasses:

DBRepair 1.10.0

  • Change Yes/No DB selector to a menu
  • Do not check the candidate DBs until after making your selection

It looks like this:

[chuck@lizum PlexDBRepair.2005]$ sudo ./DBRepair.sh 
 
 
 
      Plex Media Server Database Repair Utility (Ubuntu 22.04.5 LTS)
                       Version v1.10.00
 

Select

  1 - 'stop'      - Stop PMS.
  2 - 'automatic' - Check, Repair/Optimize, and Reindex Database in one step.
  3 - 'check'     - Perform integrity check of database.
  4 - 'vacuum'    - Remove empty space from database without optimizing.
  5 - 'repair'    - Repair/Optimize databases.
  6 - 'reindex'   - Rebuild database indexes.
  7 - 'start'     - Start PMS

  8 - 'import'    - Import watch history from another database independent of Plex. (risky).
  9 - 'replace'   - Replace current databases with newest usable backup copy (interactive).
 10 - 'show'      - Show logfile.
 11 - 'status'    - Report status of PMS (run-state and databases).
 12 - 'undo'      - Undo last successful command.

 21 - 'prune'     - Prune (remove) old image files (jpeg,jpg,png) from PhotoTranscoder cache.
 22 - 'purge'     - Purge (remove) all temporary files left by PMS & Transcoder in Temp Dir.
 42 - 'ignore'    - Ignore duplicate/constraint errors.

 88 - 'update'    - Check for updates.
 99 - 'quit'      - Quit immediately.  Keep all temporary files.
      'exit'      - Exit with cleanup options.

Enter command # -or- command name (4 char min) : Repl
 
Checking the PMS databases
Check complete.  PMS main database is OK.
Check complete.  PMS blobs database is OK.
Are you sure you want to restore a previous database backup  (Y/N) ? y
Checking for a usable backup.
Database backups available are:  2024-11-19 2024-11-01 2024-10-29 2024-10-26
 
  1) - 2024-11-19
  2) - 2024-11-01
  3) - 2024-10-29
  4) - 2024-10-26
 
Select backup date by number or date name  (blank = return to menu) 3
Checking backup candidate 2024-10-29
Database backup 2024-10-26 is valid.
 
Use backup dated: '2024-10-29' ? (Y/N) ? y
Saving current databases with timestamp: '-BACKUP-2024-12-29_23.00.36'
Copying backup database from 2024-10-29 to use as new database.
Copy complete. Performing final check
 
Database recovery and verification complete 

Thoughts?

DBRepair-1.10.tar (80 KB)

Line 1234 should be:
Output "Database backup $Candidate is valid."

4 Likes

DBRepair v1.10.0

  • Release Notes updated
  • Published

EDIT: 1.10.01 releasing shortly. minor issue discovered

1 Like

Is there any plan to eventually incorporate the DBRepair script as part of the files generated by a Plex install/upgrade? So that when the server is shutdown the script can be run manually?

1 Like

That would be something that i would support. :grinning:
@ChuckPa