Author Topic: MJPEG backups using Dropbox and Hazel [Mac only]  (Read 2164 times)

Zarkov

  • Newbie
  • *
  • Posts: 34
    • View Profile
MJPEG backups using Dropbox and Hazel [Mac only]
« on: September 29, 2010, 01:06:38 PM »
We’ve previously discussed http://skjm.com/forum/index.php?topic=615.0 backing up the iCam data streams offsite by creating an alias of them and dropping the alias in Dropbox.  The idea is that if you have your camera doing security monitoring, but someone pinches the computer, you’ve lost the recorded video.  You need to move the MJPEG files off your machine as soon as possible (and automatically) to the cloud or another machine.

The alias trick has two problems. First, if you delete one of the image files on Dropbox, it disappears from your iCam folder on your computer.  Second and more important, as shown in the thread above, this approach sometimes does not work; apparently due to changes in the Extended Attributes and Resource Forks of OSX, as described here http://www.pxc.me.uk/misc/dropbox_mac_use.html.  A possible solution using Symlinks is shown here http://wiki.dropbox.com/TipsAndTricks/SyncOtherFolders, but I have not tried it yet.  Evidently different versions of OSX.n have different alias properties.

Another option is to use Hazel http://www.noodlesoft.com/, though it will cost you $22USD.  Hazel does quite a lot, but mostly it monitors folders, and implements actions if something happens to those folders.  Hazel appears as a Preferences panel in System Preferences on a Mac and lets you setup rules for folders.  Here’s one to copy files from your [user]/pictures/iCam source motion events/[gigantic hash sequence] to Dropbox:



The folder being monitored is [user]/pictures/iCam source motion events/[gigantic hash sequence].  This rule copies, rather than mirrors, the images, so if you delete an image from your smartphone, it does not get deleted from the computer.  "Do not copy if duplicate" prevents multiple copies of the image, and the "If file exists" rule is pretty much irrelevant for iCam, since each JPEG is named with a time stamp.

One final trick - if you want the images to be persistent on your smartphone, mark the folder as a Favorite and use the Dropbox Settings on the phone to an appropriate size (like 500MB) or the images will be linked to, but not resident in, your phone.  They'd still be on the Dropbox website, though.

True paranoids like me will want to setup a tripwire imaging capability using Hazel as described here:  http://www.noodlesoft.com/forums/viewtopic.php?f=3&t=409&sid=f755510ded4234571f90f506e703a1cf.  In this case, if someone swipes your laptop, you can change a filename in Dropbox (using another computer), and the next time the perp goes online with your computer, Dropbox syncs, Hazel sees the changed filename and executes an AppleScript that takes his picture and gets his IP address!  This last is not an iCam issue, but if you get  Hazel, it's pretty cool to use it this way.


Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 2358
    • View Profile
Re: MJPEG backups using Dropbox and Hazel [Mac only]
« Reply #1 on: September 30, 2010, 07:08:08 AM »
Thanks again, Zarkov, for your excellent informative posts. :)