Auto Delete?

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

Auto Delete?

Post by MKEbrew » Tue Jul 09, 2013 6:11 pm

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: 397
Joined: Mon Mar 25, 2013 12:34 pm

Re: Auto Delete?

Post by mikb » Tue Jul 09, 2013 7:06 pm

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: 24
Joined: Fri Jun 28, 2013 2:49 pm

Re: Auto Delete?

Post by MKEbrew » Tue Jul 09, 2013 7:11 pm

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: 24
Joined: Fri Jun 28, 2013 2:49 pm

Re: Auto Delete?

Post by MKEbrew » Wed Jul 10, 2013 12:46 pm

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: 397
Joined: Mon Mar 25, 2013 12:34 pm

Re: Auto Delete?

Post by mikb » Wed Jul 10, 2013 6:19 pm

Literally :-

Code: Select all

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

MKEbrew
Posts: 24
Joined: Fri Jun 28, 2013 2:49 pm

Re: Auto Delete?

Post by MKEbrew » Wed Jul 10, 2013 6:57 pm

that's hilarious, but I love it!

mikb
Posts: 397
Joined: Mon Mar 25, 2013 12:34 pm

Re: Auto Delete?

Post by mikb » Thu Jul 11, 2013 6:48 pm

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: 24
Joined: Fri Jun 28, 2013 2:49 pm

Re: Auto Delete?

Post by MKEbrew » Thu Jul 11, 2013 6:53 pm

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests