keep zoneminder record for 1 month

Forum for questions and support relating to the 1.24.x releases only.
Locked
sejay
Posts: 2
Joined: Tue Dec 07, 2010 3:52 pm

keep zoneminder record for 1 month

Post by sejay »

Hi, I have been trying to find out how can I keep the zoneminder record for 1 month, does anyone know? Thank you.
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Post by DREMA »

What you mean? ZM keeps all your events until you run out of space, or have some filters enabled. Could you be more specific?
sejay
Posts: 2
Joined: Tue Dec 07, 2010 3:52 pm

Post by sejay »

sure, I have 3 cameras attached to zoneminder and running 24x7. (I have 1 tb gig hard drive). I would like the zoneminder to delete all the events every month and starts fresh. Is this somethng that I can do w/ the filter stuff you mentioned? If so, can you pls let me know where is that in the UI? Thank you.
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

As far as I know not possible through zoneminder itself.

However;

You could write a script that issues a few mysql commands to empty the database of events. Zmaudit would then automatically remove the orphaned image files.
User avatar
jdhar
Posts: 125
Joined: Fri Oct 01, 2010 9:15 pm
Location: California

Post by jdhar »

sejay wrote:sure, I have 3 cameras attached to zoneminder and running 24x7. (I have 1 tb gig hard drive). I would like the zoneminder to delete all the events every month and starts fresh. Is this somethng that I can do w/ the filter stuff you mentioned? If so, can you pls let me know where is that in the UI? Thank you.
Just like Flash_ said... if you want to start 'fresh' as you put it, it's easy.. just need to delete all events. For example.

echo "delete from Events where 1" | mysql -u<dbuser> -p<dbpass> zm
zmaudit.pl

Stick that in a cron job to run every month and you're good to go. Don't recommend this particularly however since it will start 'fresh', and anything significant that happens right before the deletion will likely be missed. Could setup a daily cron-job to delete a 1 month window as an alternative.
eyeZm, Native iPhone App for ZoneMinder: http://www.eyezm.com

Version 1.3 now available on iTunes, introduces Montage view, HTTPS/SSL support and H264 native streaming!

Subscribe to RSS feed for updates: http://www.eyezm.com/rssfeed.xml
zendev
Posts: 6
Joined: Mon Jun 16, 2008 4:12 pm
Location: USA/WA/Seattle

Post by zendev »

sejay wrote:sure, I have 3 cameras attached to zoneminder and running 24x7. (I have 1 tb gig hard drive). I would like the zoneminder to delete all the events every month and starts fresh. Is this somethng that I can do w/ the filter stuff you mentioned? If so, can you pls let me know where is that in the UI? Thank you.
Hi sejay,

Is there any particular reason you need to remove all the files and start fresh each 30 days? Through another board discussion on here (don't feel like hunting) I set up a filter so that anything over X days is auto-deleted from the system because I need to maintain 95 days worth of footage at all times.

Steps:
1. open filter window
2. First field "Use Filter" leave set to "Choose Filter"
3. Second field set to "Date/Time"
4. Third field set to "Less than"
5. Fourth Field set to " -30 day " (without quotes)
6. Click the "+" to add another parameter line
7. Fifth field set to "and"
8. Sixth field set to "Archive Status"
9. Seventh field "Unarchived Only"
10. Set "Sort by" to "Id" and "Asc"
11. Set "Limit to first "20" results only"
12. Select "Delete all matches" check box
13. Click "Save"
14. Assign the filter a name
15. Select "Run filter in background"
16. Save.

Its a very simple way to keep things from growing out of control and maintain a set number of days.

Ryan
Locked