Page 1 of 1

purging old events

Posted: Fri Jan 28, 2005 1:49 pm
by drdebian
I've just started out using Zoneminder and have found it to be a great piece of software so far.

I intend to use ZM for documenting the progress of the construction of a building. The site is surrounded by a number of Axis network cameras.

There is a number of editors who will pick out the most interesting pieces recorded by ZM (videos and images) and save them off somewhere. The way I understand it, ZM's archive functionality can be used for this as well.

Those bits not archived should be aged out, much like logrotate does for logfiles that have exceeded a certain age.

I tried to accomplish this by using the default purgewhenfull filter and setting it to 90% of disk usage. Now that threshold has been reached and my ZM is in the progress of clearing all unarchived material... Not what I expected... ;)

Now my question is this: Which is the best way to set up the filters so that I have a constant pool of unarchived (mos current) material in ZM while the already archived material is left untouched? The idea is for example to have only the last week of material in ZM. The editors can pick out their stuff during that period, if they come too late, it will have been deleted.

Any hints welcome! :)

Posted: Mon Jan 31, 2005 4:58 pm
by drdebian
no ideas? :(

Posted: Mon Jan 31, 2005 6:49 pm
by Ruler
I have a set up very similar to what you describe, but it works exactly as one would expect. (Delete the oldest events as the space is needed for new ones.) It's been running like this for weeks without a hitch - I have the newest n days of events, however many will fit in the terrabyte of storage I have the events written to. There is a setting in the filter window of match how many events or something like that - it tells ZM how many events to delete at one time. Make sure this isn't set to something obscenely high, otherwise it will match and delete a multitude of events at once, even if deleting just a few will drop the disk usage below the threshold you've set.

Posted: Mon Jan 31, 2005 7:47 pm
by cordel
What you ask is really easy.

Set a filter with 2 expressions.
Archive status is equal to Unarcheved Only
and Date/Time less than or equal to -1 week
Sort by date/time asc 20

You could also do the same for the archived events to clear after say a month

One expression
date/time less than or equal to -1 month
sort by date/time asc 20

Cheers,
Cordel

Posted: Sat Feb 05, 2005 1:44 pm
by drdebian
Thanks for the hint, I'll try that out.