How do I tell Zoneminder that events no longer exist? Or to update after manual file deletion?

Previous development branch now released as 1.36
Locked
BaconButty
Posts: 38
Joined: Fri Jun 12, 2020 1:29 pm

How do I tell Zoneminder that events no longer exist? Or to update after manual file deletion?

Post by BaconButty »

Hi,

I couldn't really get what I wanted to do easily with Zoneminders built in deletion function, so I'm running a script once an hour that deletes the oldest files in the events folder if it's over a certain size.

This is working really well, but the issue is that Zoneminder obviously has a store that the events happened, and so I have a list of events with no data. How can I tell Zoneminder to update and remove these events?
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: How do I tell Zoneminder that events no longer exist? Or to update after manual file deletion?

Post by knight-of-ni »

Code: Select all

sudo zmaudit.pl
NOTE: We recommend all users run zmaudit via cron on a schedule, rather than enable it within zoneminder under options. I've found running it once a week is sufficient for my purposes. ymmv
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
BaconButty
Posts: 38
Joined: Fri Jun 12, 2020 1:29 pm

Re: How do I tell Zoneminder that events no longer exist? Or to update after manual file deletion?

Post by BaconButty »

Thanks for the reply!

This runs and this is the output:

Code: Select all

12/06/20 16:19:45.548278 zmaudit[52996].INF [main:199] [Auditing All Storage Areas]
Found orphaned frame records for event '191', deleting
Found orphaned frame records for event '474', deleting
Found orphaned frame records for event '475', deleting
12/06/20 16:19:47.974543 zmaudit[52996].INF [main:199] [Auditing All Storage Areas]
Deleted 0 log table entries by time
So it's doing something, but all the events are still showing in the web interface that I've deleted.

EDIT: I think I might know what the problem is. I accidentally deleted the default storage area from my list of storages and I haven't been able to get it back. Is the audit ignoring the default events folder because it's not in my list of storages?
BaconButty
Posts: 38
Joined: Fri Jun 12, 2020 1:29 pm

Re: How do I tell Zoneminder that events no longer exist? Or to update after manual file deletion?

Post by BaconButty »

Finally have zoneminder doing what I wanted and started looking through the settings to see if there's anything I missed and I found:

Image

I'm guessing this is why audit wouldn't work for me (the files where not this old). I need to wait for me storage to max out again, I'll retry this when it does.
Locked