Autoclean via Date/time or low disk space....

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

Autoclean via Date/time or low disk space....

Post by yosco »

I know some people have contributed this type of system, however I haven't had an automatic process work, I just wite a script to delete event files X days older than today and them do a ZMaudit manually. Is there anything in the works to have ZM take care of cleanup internally?


-Scott
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

The built in script works. It's a little picky about how you set it up though. The "PurgeWhenFull" filter needs to be resaved and you will get a window with actions and need to check the delete checkbox. You might also want to change the disk percent to 95 or a little less. to set the filter to delete after a month set up like so
Use 2 filter expressions
Archive Status is equal to Unarchived Only
and Date/Time less than or equal to -1 month

Sort by Date/Time Assending limit to first 20 events

Click on save and give it a name and check the delete action and save.
Hope this helps,
Cordel
Image
Image
3939663646337

It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

Post by yosco »

What version is this in? Do you have a sample script by chance? Or Step by step instructions??


-Scott

Thx
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Searching for PurgeWhenFull will find several references. This thread is one of the most recent and contains step by step instructions.

Phil
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

Post by yosco »

Nice, you may want to add that to the FAQ, I search clean, autoclean and archive and couldn't find anything about the purge script. I don't see this is v0.9.16 guess that really old, Any way to manually create one? How's the update path from this version to the latest?

-Scott
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

This works all the way back to 1.18.0 at least that I know of. All you have to do is open the filter window from the console by clicking any of the event listings and set the settings like above, click save, give the filter a name and check the action then save.
Cheers,
Cordel
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

As the result of the suggestion above this has now been added to the FAQ.

Phil
Post Reply