Page 1 of 1

FTP Upload

Posted: Wed Nov 16, 2005 5:31 pm
by Carbide_tipped
I have 3 cams. One front yard, one back and one in the zoneminder server room. Is there a way to upload (at a given time of the day and day of week) events to there own directory and recycle the data after x amount of events?

The idea is if im not home and the server gets taken I will have some data off site. I don't want it to upload (use bandwith) when im home or fill up the ftp server.

Posted: Wed Nov 16, 2005 5:48 pm
by jameswilson
zm itself can upload to an ftp and you use filters to control what it uploads, filters runn all the time so if you only wanted out of hours footage uploaded, it would only upload these events out of hours as they happered. Assuming you bandwidth can keep up!"!!

Posted: Thu Nov 17, 2005 2:52 pm
by Carbide_tipped
Is there premade filters or scripts to accomplish what I need? The premade purgewhenfull filter was a great addition and helped alot. To me this is very important function to make a fool proof security system but I dont have the knowledge to do this.

Posted: Thu Nov 17, 2005 3:47 pm
by jameswilson
no but its easy to make one
basically you set queries like you would on any database
If you let me know what you want to haoppen i will let you know what you need to put where to get the desired result but you caould start with purge when full, modify it then save it, when you save it give it a new name and select upload events instead of delete events!

Posted: Thu Nov 17, 2005 4:50 pm
by Carbide_tipped
Ok, I want cam1 to upload all events between 6:00 am to 3:00 pm monday-friday and delete the oldest event once it reaches 10 events from ftp server.

Another way is to upload the frames and then delete the oldest frame from the server once it reaches 50 frames. This way you would probably have a better chance to get the frame's you want while the theif is unpluging the server. :)

I have seen this function in other video security software. But ofcourse zoneminder own's them all..:-)

If you get this working close to that then i'm sure I can tweek from there.

Posted: Thu Nov 17, 2005 6:40 pm
by jameswilson
i problem though once its uploaded zm cant do anything else ie i cant delete events, you would need something seperate to that as far as i know

leave it with me i will have a look and post back

Posted: Thu Nov 17, 2005 7:24 pm
by Carbide_tipped
Awesome, thank you. I would think this would be a great feature for zm.

Posted: Thu Nov 17, 2005 7:35 pm
by jameswilson
filter setup
use 3 expressions
1st
monitor id = mon id of cam1

and time less than -6:00
and time less than -15:00
think that will do you

before you save it submit it and check the table has the correct events in it
once happy your filter is correct press save
name it ftpMonx6-3 and tick autoupload all matching press save and your in
I assume you have setup all your ftp details in options??

Posted: Thu Nov 17, 2005 10:02 pm
by Carbide_tipped
Hmm, wouldn't it be?

and time greater than -6:00
and time less than -15:00

Then could I add day(s) of the week to the same filter?

Then create another filter with the same info to run a script to maintain the ftp server so i won't go over my disk quota?

Posted: Thu Nov 17, 2005 10:23 pm
by zoneminder
I don't think you need the hyphens in the time, so if you want if after 3pm then just use 15:00. As always though, just run the filters interactively until you get the results you are after before saving.

Phil

Posted: Thu Nov 17, 2005 10:25 pm
by jameswilson
maybe, but you wont be able to run a zm filter on an external ftp server as it uses the local mysql database not the actual images, you will need some sort of script to run to delete images older than x days

I dont have enough data on my zm to test that filter (i purged it) but hopefully that should be enough to get you started, if you could report back the actual values that worked that would help

James

Posted: Tue Feb 01, 2011 2:46 am
by nausser
What about the weekdays? He stated he was looking for Monday - Friday. How would this part be added to the filter? I've tried:
Date equal to Weekday

It seems to be breaking my filter though.

On a side note. To delete the oldest frames or videos on the FTP server, run a cron job on the FTP server separately. Assuming you have admin control on the FTP server of course.