# DBRepair development

**URL:** <https://forums.plex.tv/t/dbrepair-development/822684>\
**Category:** Apps & Creations\
**Created:** [December 14, 2022, 3:57am UTC](https://forums.plex.tv/t/dbrepair-development/822684 "2022-12-14T03:57:23Z")\
**Posts on this page:** 20\
**Page:** 33

<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:** [May 31, 2025, 12:01am UTC](https://forums.plex.tv/t/dbrepair-development/822684/697 "2025-05-31T00:01:28Z")

</div>

I do not know HOW to put that in windows!

I have a 911 out to Dan

LOL

---

<div class="post-metadata">

**Author:** ![SE56](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/se56/32/222425_2.png) [@SE56](https://forums.plex.tv/u/SE56)\
**Post date:** [May 31, 2025, 12:05am UTC](https://forums.plex.tv/t/dbrepair-development/822684/698 "2025-05-31T00:05:16Z")

</div>

Thats a -SOS

---

<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:** [May 31, 2025, 12:07am UTC](https://forums.plex.tv/t/dbrepair-development/822684/699 "2025-05-31T00:07:33Z")

</div>

I don’t see any shingles !

LOL

---

<div class="post-metadata">

**Author:** ![Tony\_T](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tony_t/32/311528_2.png) [@Tony\_T](https://forums.plex.tv/u/Tony_T)\
**Post date:** [May 31, 2025, 12:35am UTC](https://forums.plex.tv/t/dbrepair-development/822684/700 "2025-05-31T00:35:46Z")

</div>

I guess mine was ok:

```auto
Ok to begin deflating the databases? (Y/N) ? Y
Removing - block 1
Removed 0 records.
Vacuuming DB to reclaim working space.
Initial Database size = 178 MB
Final Database size = 177 MB

```

**BTW, not seeing this recorded in the DBRepair.log**

```auto
2025-05-30 20.33.29 - ============================================================
2025-05-30 20.33.29 - Session start: Host is Ubuntu 24.04.2 LTS
2025-05-30 20.36.23 - Exit - Retain temp files.

```

---

<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:** [May 31, 2025, 12:46am UTC](https://forums.plex.tv/t/dbrepair-development/822684/701 "2025-05-31T00:46:01Z")

</div>

@Tony_T

I didn’t write anything to the log because there are users who have completely full disks. ( Some DBs are 3+ TB and filled the HDDs ) I don’t know how many are out there so I opted for absolute minimum disk space increase.

I could write a log entry after the fact.

Good idea.

---

<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:** [May 31, 2025, 12:47am UTC](https://forums.plex.tv/t/dbrepair-development/822684/702 "2025-05-31T00:47:02Z")

</div>

> [@Tony\_T](#):
>
> ```auto
> Vacuuming DB to reclaim working space.
> Initial Database size = 178 MB
> Final Database size = 177 MB
> 
> ```

That makes sense. Vacuum will always get a little bit.  
( This is pure integer math )

In your case, normal auto is now the next step.

---

<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:** [May 31, 2025, 1:41am UTC](https://forums.plex.tv/t/dbrepair-development/822684/703 "2025-05-31T01:41:45Z")

</div>

@Tony_T

If you open DBRepair.sh in the text edit,

scroll down to line 1789

Would you align with this and then copy/paste in these lines and try it?  
See if you like how that reports in the DBRepair.log ?

```auto
  # Turn journal mode back on
  Result="$("$PLEX_SQLITE" "$CPPL.db" "PRAGMA journal_mode = WAL;")"

  # Now write abbreviated log entries
  WriteLog "Deflate - Report."
  WriteLog "Deflate - Initial Database size = $((InitialSize / 1000000)) MB"
  WriteLog "Deflate - Final Database size = $((Size / 1000000)) MB"
  WriteLog "Deflate - Records Removed = $TotalRemoved"
  WriteLog "Deflate - PASS."
}

```

---

<div class="post-metadata">

**Author:** ![Tony\_T](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tony_t/32/311528_2.png) [@Tony\_T](https://forums.plex.tv/u/Tony_T)\
**Post date:** [May 31, 2025, 2:24am UTC](https://forums.plex.tv/t/dbrepair-development/822684/704 "2025-05-31T02:24:32Z")

</div>

> [@ChuckPa](#):
>
> If you open DBRepair.sh in the text edit,
> 
> scroll down to line 1789
> 
> Would you align with this and then copy/paste in these lines and try it?  
> See if you like how that reports in the DBRepair.log ?

```auto
2025-05-30 22.22.13 - ============================================================
2025-05-30 22.22.13 - Session start: Host is Ubuntu 24.04.2 LTS
2025-05-30 22.22.21 - Deflate - Report.
2025-05-30 22.22.21 - Deflate - Initial Database size = 178 MB
2025-05-30 22.22.21 - Deflate - Final Database size = 177 MB
2025-05-30 22.22.21 - Deflate - Records Removed = 0
2025-05-30 22.22.21 - Deflate - PASS.

```

---

<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:** [May 31, 2025, 2:26am UTC](https://forums.plex.tv/t/dbrepair-development/822684/705 "2025-05-31T02:26:13Z")

</div>

How’s that look as you look at the whole log ?

---

<div class="post-metadata">

**Author:** ![Tony\_T](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tony_t/32/311528_2.png) [@Tony\_T](https://forums.plex.tv/u/Tony_T)\
**Post date:** [May 31, 2025, 2:34am UTC](https://forums.plex.tv/t/dbrepair-development/822684/708 "2025-05-31T02:34:22Z")

</div>

> [@ChuckPa](#):
>
> How’s that look as you look at the whole log ?

Looks fine…

```auto
.....
2025-05-30 20.38.52 - Auto - COMPLETED
2025-05-30 20.39.08 - Exit - Retain temp files.
2025-05-30 20.39.08 - Session end. Fri May 30 20:39:08 EDT 2025
2025-05-30 20.39.08 - ============================================================
2025-05-30 22.22.13 - ============================================================
2025-05-30 22.22.13 - Session start: Host is Ubuntu 24.04.2 LTS
2025-05-30 22.22.21 - Deflate - Report.
2025-05-30 22.22.21 - Deflate - Initial Database size = 178 MB
2025-05-30 22.22.21 - Deflate - Final Database size = 177 MB
2025-05-30 22.22.21 - Deflate - Records Removed = 0
2025-05-30 22.22.21 - Deflate - PASS.
2025-05-30 22.24.59 - Auto - START
2025-05-30 22.25.00 - Check - Check com.plexapp.plugins.library.db - PASS
2025-05-30 22.25.00 - Check - Check com.plexapp.plugins.library.blobs.db - PASS
2025-05-30 22.25.00 - Check - PASS
2025-05-30 22.25.39 - Repair - Export databases - PASS
2025-05-30 22.25.47 - Repair - Import - PASS
2025-05-30 22.25.48 - Repair - Verify main database - PASS (Size: 169MB/169MB).
2025-05-30 22.25.48 - Repair - Verify blobs database - PASS (Size: 254MB/254MB).
2025-05-30 22.25.48 - Making repaired databases active
2025-05-30 22.25.48 - Repair - Move files - PASS
2025-05-30 22.25.48 - Repair - PASS
2025-05-30 22.25.48 - Repair - PASS
2025-05-30 22.25.48 - Reindex - MakeBackup com.plexapp.plugins.library.db - PASS
2025-05-30 22.25.49 - Reindex - MakeBackup com.plexapp.plugins.library.blobs.db - PASS
2025-05-30 22.25.49 - Reindex - MakeBackup - PASS
2025-05-30 22.25.50 - Reindex - Reindex: com.plexapp.plugins.library.db - PASS
2025-05-30 22.25.50 - Reindex - Reindex: com.plexapp.plugins.library.blobs.db - PASS
2025-05-30 22.25.50 - Reindex - PASS
2025-05-30 22.25.50 - Reindex - PASS
2025-05-30 22.25.50 - Auto - COMPLETED
2025-05-30 22.26.17 - Exit - Retain temp files.

```

---

<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:** [May 31, 2025, 2:49am UTC](https://forums.plex.tv/t/dbrepair-development/822684/709 "2025-05-31T02:49:42Z")

</div>

Thanks.

I’ll update tomorrow and reissue.

---

<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:** [May 31, 2025, 4:01am UTC](https://forums.plex.tv/t/dbrepair-development/822684/710 "2025-05-31T04:01:48Z")

</div>

DBRepair - v1.11.03 - Summary log information after Deflate.

> **[Release v1.11.03 - add summary logfile report/ · ChuckPa/DBRepair](https://github.com/ChuckPa/DBRepair/releases/tag/v1.11.03)**
>
> v1.11.03
> Minor update to v1.11.02 -- Add summary logfile information after process complete.

---

<div class="post-metadata">

**Author:** ![SE56](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/se56/32/222425_2.png) [@SE56](https://forums.plex.tv/u/SE56)\
**Post date:** [May 31, 2025, 4:09am UTC](https://forums.plex.tv/t/dbrepair-development/822684/711 "2025-05-31T04:09:25Z")

</div>

Error returned. 1.11.02 works fine

 ![Screenshot 2025-05-31 at 2.06.37 pm](https://global.discourse-cdn.com/plex/original/4X/1/2/5/12545f7161058572453e0e34c4c8e0cf2a9e7ffe.jpeg)

---

<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:** [May 31, 2025, 4:37am UTC](https://forums.plex.tv/t/dbrepair-development/822684/712 "2025-05-31T04:37:21Z")

</div>

I’m sorry?

You are invoking `DBRepair.sh stop auto start exit`

and it reports `Tar` ?

Isn’t the command `tar` (lower case) ?

what’s happening to that screenshot ?

```auto
-rw-rw-r-- 1 chuck chuck 66212 May 31 00:35 DBRepair-1.11.03.tar.gz

```

 ![Screenshot from 2025-05-31 00-39-43](https://global.discourse-cdn.com/plex/original/4X/3/8/2/382ee56a0d68919b522e0c73a19dce94a22bf06c.png)

You should also be able to use the 88|update command too

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [May 31, 2025, 5:47am UTC](https://forums.plex.tv/t/dbrepair-development/822684/713 "2025-05-31T05:47:38Z")

</div>

@SE56

tar xvzf

The file is compressed. You may need the z flag.

---

<div class="post-metadata">

**Author:** ![SE56](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/se56/32/222425_2.png) [@SE56](https://forums.plex.tv/u/SE56)\
**Post date:** [May 31, 2025, 7:08am UTC](https://forums.plex.tv/t/dbrepair-development/822684/715 "2025-05-31T07:08:34Z")

</div>

All good now

---

<div class="post-metadata">

**Author:** ![Tony\_T](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tony_t/32/311528_2.png) [@Tony\_T](https://forums.plex.tv/u/Tony_T)\
**Post date:** [June 1, 2025, 2:08am UTC](https://forums.plex.tv/t/dbrepair-development/822684/716 "2025-06-01T02:08:57Z")

</div>

Need to update The Menu for the 911 Option in the Readme [GitHub - ChuckPa/DBRepair: Database repair utility for Plex Media Server databases](https://github.com/chuckpa/dbrepair?tab=readme-ov-file#the-menu)

---

<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:** [June 1, 2025, 2:49am UTC](https://forums.plex.tv/t/dbrepair-development/822684/717 "2025-06-01T02:49:56Z")

</div>

@Tony_T

This is temporary. (documented in the release notes)

---

<div class="post-metadata">

**Author:** ![mat\_b](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mat_b/32/220908_2.png) [@mat\_b](https://forums.plex.tv/u/mat_b)\
**Post date:** [June 1, 2025, 5:02pm UTC](https://forums.plex.tv/t/dbrepair-development/822684/718 "2025-06-01T17:02:02Z")

</div>

Hi Chuck, reddit redirected me here when I noticed my database files went from 200mb to 57gb

Tried running the powershell tool in Windows over night and 11hrs later it was still showing the ‘running’ prompt but I couldnt tell it to Exit and eventually had to restart my computer. Now my C: is missing a lot of space (from the temp files used?)

What’s my best path here? Run Optimize in PMS or do I run the DBRepair again? And how do I clean up the space used over night? (is it com.plexapp.plugins.library.db-wal? will auto continue it or is it 40GB of junk now?)

---

<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:** [June 1, 2025, 5:44pm UTC](https://forums.plex.tv/t/dbrepair-development/822684/719 "2025-06-01T17:44:52Z")

</div>

@mat_b

The current Windows version is the ‘slow’ method. It does take a long time.

The guy who does the Windows version of DBRepair (powershell) will be home tonight. He will look at taking the improvements I’ve made in Linux and transplanting to Windows.

With luck, it will be equally improved.

Last night, on Linux, I helped a user with his 70 GB DB reduce it back to 680 MB.

He was running the original slow version of my script.

- We interrupted it.
- We then deleted the WAL & SHM files
- We then did the database deflate with the new version (DEFLATE command)
- Lastly we let DBRepair AUTO fix the minor error interrupting it caused (no data loss)
- He did confirm everything was intact.
- On his machine it took some 2.5 hours from start to finish

I will ask to be patient a little longer  
We have the better method.  
PMS itself should be fixed too.

Between the two, the DB should return to normal quickly and stop bloating.

[Previous page](https://forums.plex.tv/t/dbrepair-development/822684.md?page=32)

[Next page](https://forums.plex.tv/t/dbrepair-development/822684.md?page=34)
