Most events have been deleted

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
JimS
Posts: 37
Joined: Sun Feb 18, 2007 3:16 pm

Most events have been deleted

Post by JimS »

Have been running my system with several cameras for a while. Recently the number of events stored went way down and only had the last day or two. When I checked several days ago the storage had hit 96% full which should have triggered some deletion but it now sits at 37%. I have less than 10 events for any camera. I must not understand how the filters work but think I set them up as recommended from info on the web. I have two - a purge when full and a update disk space. I have attached a screen shot of both. It has been a while since I messed with them but I think the update disk space was intended to delete old recordings. If the storage still went over 95% the purge would delete 100 events at a time until it was under 95%. Need to figure out what is happening and what changes I need to make to get that behavior.
Updatediskspace.PNG
Updatediskspace.PNG (24.6 KiB) Viewed 2389 times
Purgewhenfull.PNG
Purgewhenfull.PNG (24.21 KiB) Viewed 2389 times
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Most events have been deleted

Post by dougmccrary »

Pretty sure "Delete all matches" in "Update DiskSpace" should be "Update used disk space" instead...
JimS
Posts: 37
Joined: Sun Feb 18, 2007 3:16 pm

Re: Most events have been deleted

Post by JimS »

I looked around and didn't find much on the options other than noting that there were some options. Is there somewhere that has more detail or ideally some examples of what I am trying to do? This should be a pretty common need.
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Most events have been deleted

Post by dougmccrary »

Well, the filters become sql queries and actions. The list matches button doesn't work well. The debug button shows (most of) the query.

Update disk space should be an entirely separate filter, at least in all the examples I've seen.

It looks to me that you're trying to delete events older than 30 days, or, if low on space, to delete until you have enough space. Yes?
If so, do you really need to delete older than 30 days? The regular purge filter will give you disk space, regardless.

You've read here, https://zoneminder.readthedocs.io/en/st ... vents.html right?
JimS
Posts: 37
Joined: Sun Feb 18, 2007 3:16 pm

Re: Most events have been deleted

Post by JimS »

My disk space is now at 63% and is growing more quickly than expected although I have a lot of short recordings that are motion triggered that aren't anything. Motion tuning is needed but that's a different issue.

I have unchecked "run in background" and saved both so thinking it will stop all automatic running of the filters. Now I should be able to play with the settings (reducing the amount filled or end date) and view what it will delete without actual deletion. You say that doesn't work well - how do I get good results?

Yes, I want to delete events older than 30 days, or, if low on space, to delete until I have enough space. You say a "regular purge filter" will do that - What is that exactly? Or is that the same as the predefined purge when full? Does the purge when full delete oldest events first by default or do I need to modify it somehow for that?

You say Update disk space should be an entirely separate filter - as far as I can tell that's what I have. If it isn't please explain further...
You mention all the examples you have seen. If you could provide a link to where I would find examples that would be very helpful.
JimS
Posts: 37
Joined: Sun Feb 18, 2007 3:16 pm

Re: Most events have been deleted

Post by JimS »

I also have a few events from about a year ago that were not deleted in the running of the filters. Not clear at all why not because as I understand it the purge when full should delete oldest events first. I also seem to have some events associated with old camera names that are no longer used. I am thinking the filters only work on current camera names so I need to somehow delete the old, now unused named events. Those taking up room may be part of the reason for filling the disks up faster than expected.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Most events have been deleted

Post by Magic919 »

I've had to do similar deletes from the filesystem. Give zmaudit a run afterwards to see if the DB needs to be brought into sync.
-
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Most events have been deleted

Post by dougmccrary »

I have unchecked "run in background" and saved both so thinking it will stop all automatic running of the filters. Now I should be able to play with the settings (reducing the amount filled or end date) and view what it will delete without actual deletion. You say that doesn't work well - how do I get good results?
I use small numbers and "Execute"
Yes, I want to delete events older than 30 days, or, if low on space, to delete until I have enough space. You say a "regular purge filter" will do that - What is that exactly? Or is that the same as the predefined purge when full? Does the purge when full delete oldest events first by default or do I need to modify it somehow for that?
The regular purge filter will keep enough space open so as not to loose anything due to lack of space. If you really want to delete older than 30 days, I suggest you make a separate filter for that. Yes, you can put it all in one, but trouble shooting is easier when they're separate.
You say Update disk space should be an entirely separate filter - as far as I can tell that's what I have. If it isn't please explain further...
Your posted filter 2 named "Update DiskSpace" does not update disk space because the box for that is not checked. Or at least I would not expect it to.
You mention all the examples you have seen. If you could provide a link to where I would find examples that would be very helpful.
Yes, it would. Sorry, but that's been over years...try searching these forums for "filter" - you'll find a few.
Good luck.
Post Reply