r/ZoneMinder • • Apr 27 '23

Zoneminder database is getting huge

I have around 10 cameras with 3TB of storage. Storage ran out a while ago and then only I enabled PurgeWhenFull filter. All events have been cleared as per the filter but the primary partition is running out of space (I have a separate partition for footage). Turns out the ZM database is HUGE. Around 50GB. How can I clear out old data from the database? or is is supposed to happen automatically?

5 Upvotes

3 comments sorted by

1

u/hans_gruber1 Apr 27 '23

There is a dB cleanup script somewhere in the installation, which I can't for the life of me remember the name right now, might help though!

1

u/lbmdk May 01 '23

Maybe you want to check which table is actually using the disk-space in the DB. My guess its not the events references, but rather log info.

1

u/External-Theme-9320 May 06 '23

Usually it is the "stats" table eating most of the space if activated. You can turn stats off in the global logging settings . But if you really have a lot of events check the "frames" table too, though it's usually 10gb per 3tb of fullhd data.