Page 1 of 1

Auto Delete?

Posted: Tue Jul 09, 2013 6:11 pm
by MKEbrew
I tried to search the forum for this, but had no luck. Is there a way to configure zm to auto delete events and images older than 30 days?

Re: Auto Delete?

Posted: Tue Jul 09, 2013 7:06 pm
by mikb
http://www.zoneminder.com/wiki/index.php/Documentation

Look at the section on filters, especially "PurgeWhenFull" filter, but adapted ...

From my install notes ...

Purge When Full

This filter is already installed, but needs enabling

"Archive Status equal to Unarchived Only" "and Disk Percent greater than or equal to 95"
"Limit to first 50 results only" and tick "Delete All Matches"
Then click "Save" and select "Run Filter In Background"

"Purge When Old"

"Archive Status equal to Unarchived Only" "and Date less than 7 days ago"
and tick "Delete All Matches"
Then click "Save" and select "Run Filter In Background"

Big Noobie Note: The use of "less than 7 days ago" means OLDER THAN 7 days. This is not intuitive, until you realise it means a date MATHEMATICALLY LESS THAN 7 days ago, which is OLDER. You will want 30 days here.

You can test what the filter will do by hitting "submit" and it will show you a list of events that "would have" been deleted if it ran properly.

Hope that points you in the right direction. Filters are very powerful, and make sure you test them before setting them to run in the background :)

Re: Auto Delete?

Posted: Tue Jul 09, 2013 7:11 pm
by MKEbrew
That looks to be exactly what I'm looking for, very helpful. I didn't think I needed to use "filters" for anything so I was sorta skipping right over it. I gotta figure out this verbiage!

Thanks!

Re: Auto Delete?

Posted: Wed Jul 10, 2013 12:46 pm
by MKEbrew
ok, now that I understand what filters are and how they work, I have one more question. When I set the filter to Date and less than, do I put in "30" or do I put in "30 days", "30d"?

Re: Auto Delete?

Posted: Wed Jul 10, 2013 6:19 pm
by mikb
Literally :-

Code: Select all

30 days ago
but I'm sure other syntaxes are available :)

Re: Auto Delete?

Posted: Wed Jul 10, 2013 6:57 pm
by MKEbrew
that's hilarious, but I love it!

Re: Auto Delete?

Posted: Thu Jul 11, 2013 6:48 pm
by mikb
MKEbrew wrote:that's hilarious, but I love it!
Well it's true, isn't it? :) You can use all sorts of notations in the filters. I'm not sure if the "ago" is needed/ignored, but it makes it clearer to me.

Re: Auto Delete?

Posted: Thu Jul 11, 2013 6:53 pm
by MKEbrew
Got it. Changed to 7 days after I started wondering why I thought I needed 30. Still need to tweak the sensitivity to reduce some of this, but that's a different thread and I think I got the info I need. Just need to spend some time on it.

Thanks for the help!