FTP Upload

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
Carbide_tipped
Posts: 16
Joined: Mon Jul 19, 2004 2:00 pm
Location: Minnesota, USA

FTP Upload

Post 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.
I'm in control till it's out of control
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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!"!!
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
Carbide_tipped
Posts: 16
Joined: Mon Jul 19, 2004 2:00 pm
Location: Minnesota, USA

Post 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.
I'm in control till it's out of control
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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!
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
Carbide_tipped
Posts: 16
Joined: Mon Jul 19, 2004 2:00 pm
Location: Minnesota, USA

Post 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.
I'm in control till it's out of control
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
Carbide_tipped
Posts: 16
Joined: Mon Jul 19, 2004 2:00 pm
Location: Minnesota, USA

Post by Carbide_tipped »

Awesome, thank you. I would think this would be a great feature for zm.
I'm in control till it's out of control
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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??
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
Carbide_tipped
Posts: 16
Joined: Mon Jul 19, 2004 2:00 pm
Location: Minnesota, USA

Post 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?
I'm in control till it's out of control
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
nausser
Posts: 18
Joined: Sat Oct 09, 2010 9:08 pm
Location: South Florida

Post 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.
Time never ceases to accelerate.
Locked