automically old event delete ??

Support and queries relating to all previous versions of ZoneMinder
Locked
panadol
Posts: 5
Joined: Tue Nov 30, 2004 6:59 pm

automically old event delete ??

Post by panadol »

Hi
I am new Zoneminder user. I'm sorry but my english is very bad.
I have simple question abaut events in ZM.
Are eldest events automattically delete when my disk with var catalog is full ??
Can I make that they will be deleted for example when disk is 90% full ??
Best regards
Adam Pilat
sgn
Posts: 68
Joined: Mon Oct 25, 2004 2:36 pm

Post by sgn »

Sure. If you look in the "Hints/Tips"-section of the forum, you'll find a great script to be run in cron. ZM has such a function integrated, in the Event-filter window there is a dropdown with the "PurgeWhenFull"-filter.

Configure, save, sit back and let it do the work.
panadol
Posts: 5
Joined: Tue Nov 30, 2004 6:59 pm

Post by panadol »

Hi
Thx for Your answer. I found this Purgewhenfull filter and configure.
I make disk procent=50 and mark delete events. Now when disk ist over 50% events in ZM console are delete but disk procent still grov up and in var - events catalog old events still exist. Will they delete later ??
PanAdol
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

First the events are deleted from the database, and then some while later the images are cleaned off disk.

The other place ZM may be consuming diskspace is with its log files, so it's a good idea to rotate them from time to time. I use "logrotate" with a script like this:

Code: Select all

/var/log/zone/*.log {
        missingok
        rotate 7
        weekly
        compress
        nocreate
        nomail
        notifempty
        sharedscripts
        prerotate
                /etc/init.d/zoneminder stop > /dev/null
        endscript
        postrotate
                (sleep 30; /etc/init.d/zoneminder start) > /dev/null
        endscript
}
Rick Hewett
Locked