I don't think you can do it directly
but there are a few options that might achieve what you want. I
call a short script when motion is detected on my raspberry pi,
which in turn runs rsync to copy files to another server. I used
# Command to be executed when a motion frame is detected (default:
; on_motion_detected <myscript>
but this often resulted in multiple rsync processes. Then I
discovered I could use:
# Command to be executed when an event ends after a period of no
# (default: none). The period of no motion is defined by option
on_event_end /home/dougie/bin/motion_detected >
which does exactly what I need.
In my 'motion_detected' script I have the following two lines:
rsync --ignore-existing -ruv /home/dougie/webcam/
ssh phoenix album -geometry=320x180 -sort=date -reverse_sort
/diskb/webcams/pi1/$(date +%Y)/$(date +%m)/$(date +%d
(the second line has nothing to do with motion - it's just a neat
way of always having quick access to all my webcam images anywhere
on my homelan).
You'd have the issue that you'd still have a local copy of the
images on your source machine - in my case the rpi. I tend to
housekeep this quite aggressively, clearing out all images more
than a day old using find in a cron job. I deliberately don't use
'--delete' in my rsync so that 'phoenix' keeps an archive of
images that I can housekeep as necessary.
On 21/07/13 08:40, october8134 wrote:
Is there a way to specify a network location for
"target_dir"? I don't want to save the image to a drive
connected to the PC. I want to connect to a drive that's on
the network...something like "192.168.1.7/storage/webcam"
I just joined the list.
Please excuse me for any mailing list etiquette violations.
I'm much more familiar with forums than mailing lists.
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
Motion-user mailing list