Compact/repair db

It's automatic. Under "Recording and Clips" => "The Database and Clips List", you find the options to change the time and/or days for the automatic compact/repair.

From BI's built-in "Help", page 114:

"Database maintenance is ran each 5 minutes. This is the function that actually deletes and
moves files between folders according to the rules defined. You may start it manually at any
time with right-click menu option in Clips, Database—>Run maintenance.
Database compact/repair is normally performed each night at 2am. The primary purpose
of this function is to remove “holes” in the database produced by deleted records. It is
typically a short process, but recording is suspended during this time. If 2am is not a good
time to pause recording, you may wish to change this time, select specific days of the week
for it to occur, or disable it altogether and perform it manually on occasion by using the
right-click menu option in Clips, Database—>Compact/Repair. If you disable this option yet
neglect to perform it manually, the database will grow unbounded and performance will
suffer.
The option for Database Delete & Regenerate also exists. This one really creates a new
database from scratch and re-imports everything. Please note that video and JPEGs are
retained, but alert images and other flags that exist only in the database will be lost. You do
have the option to save each alert image as a file instead with an option on the Trigger tab in
each camera’s settings pages."
 
I think by default it’s set to run at 2am everyday but I’ve set mine to run at 12pm on a Sunday, so during the day and when I’m most likely to be home.

Reason is while it’s doing a compact/repair it stops recording and for me 2am is not a good time to stop recording even if it is only for a few minutes.
 
I run mine every other day, at 9am.
My DB is on an SSD drive.
It takes less than 10 seconds for my DB maintenance to complete.
View attachment 128644
Hmmm...my DB is on an Intel M.2 PCI-E drive and takes almost Three minutes to run. Why the big difference?

1653286385940.png

The clips.dat file is 6.8GB and the index.dat file is 10 meg.
 
( looks at his thousands of tiny files).... yeah mine takes awhile.
Last time I tried to monitor a repair/compact cycle, was in like January. I think it took about 8-10 minutes.
 
Not complaining about a couple of minutes. Just was wondering why the big difference between mine and loonie's.
 
  • Like
Reactions: Flintstone61
Yeah I get it. I suppose you'd have to see if its Apples to Apples on everything.
 
( looks at his thousands of tiny files).... yeah mine takes awhile.
Last time I tried to monitor a repair/compact cycle, was in like January. I think it took about 8-10 minutes.
That is very long. I just tested a system with 4300 files and it took 3 seconds. Its you database on an ssd?
8-10 minuets means you are not recording for those 10 min and you should do it manually. But something is really off if it takes that long.
 
I'll check it tomorrow.
I think I had like 110,000 files across 13 TB
C drive is 250 GB Samsung EVO where data base resides.
maybe i'm completely off.
been a trying day. the " jimmy Pry Bar asshole" got in again and wreaked havoc breaking 5 car windows, and got lucky and found a residents Pistol. been prparing evidence files where I can to upload to Ramsey County Sherriff...
I'm ready to run screaming into the forest.....
upset residents, pissed off residents, offended residents, cops, reports, quack quack quack.
 
Had a bunch of files in two no longer used folders that were still allocated in the Folders section of the Clips and archiving tab. Deallocated those two folders and moved them to a different path. Repaired the DB (took 10 1/2 minutes to complete) and now the sizes are 4.7GB for clips and 7meg for the index. It went down from 322,927 files to 214,198 files. Will see how long it takes Thursday morning to do the DB Compact.
 
One of my surveillance drives has apparently failed so I had to move everything onto the remaining drive (a good reason to have more than one surveillance drive). I had to do a repair/regenerate as a result. There are about 120,000 clips in the database. It took about two minutes to repair/regenerate on my system.

Here are the db directory stats - ( drive designation of "J" is the map on the laptop to the C drive on the BI machine.

db stats.JPG
 
Last edited:
Funny, I thought mine was taking way to long until I realized I was thinking I was looking at minutes instead of seconds! :facepalm:

0 5/24/2022 2:00:04.424 AM Clips DBCompact: started
0 5/24/2022 2:00:28.858 AM Clips DBCompact: finished

5,528 clips from 5 cameras about 8TB being used across 2 drives.
clips.dat is 1.6 GB and on the SSD.
 
the reason D:\ has free space, is that's where I'm writing my C:\ drive backups. My automated schedule is Mon/Wed 2:00 Am.
 
  • Like
Reactions: sebastiantombs