Auto Delete?

Forum for questions and support relating to the 1.25.x releases only.
Locked
MKEbrew
Posts: 31
Joined: Fri Jun 28, 2013 2:49 pm

Auto Delete?

Post 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?
mikb
Posts: 586
Joined: Mon Mar 25, 2013 12:34 pm

Re: Auto Delete?

Post 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 :)
MKEbrew
Posts: 31
Joined: Fri Jun 28, 2013 2:49 pm

Re: Auto Delete?

Post 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!
MKEbrew
Posts: 31
Joined: Fri Jun 28, 2013 2:49 pm

Re: Auto Delete?

Post 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"?
mikb
Posts: 586
Joined: Mon Mar 25, 2013 12:34 pm

Re: Auto Delete?

Post by mikb »

Literally :-

Code: Select all

30 days ago
but I'm sure other syntaxes are available :)
MKEbrew
Posts: 31
Joined: Fri Jun 28, 2013 2:49 pm

Re: Auto Delete?

Post by MKEbrew »

that's hilarious, but I love it!
mikb
Posts: 586
Joined: Mon Mar 25, 2013 12:34 pm

Re: Auto Delete?

Post 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.
MKEbrew
Posts: 31
Joined: Fri Jun 28, 2013 2:49 pm

Re: Auto Delete?

Post 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!
Locked