Using Bittorrent Sync (btsync) to back-up/copy video files
  • I've been tinkering with btsync over holiday (http://www.bittorrent.com/sync) to keep synchronized off-site backups of motion detection video on other Macs. This is a sync software built upon the bittorrent protocol. It's pretty simple to use, and it really shines when you want to copy to many Macs/devices because it distributes the copies. It's anti-cloud, instead of using somebody else's computers out there ("the cloud"/S3/Dropbox), it uses your own computers. It's also clever enough to work through double NAT, so it's pretty robust at getting the job done. I like it so far, so I thought I'd try to describe a rough overview how I use it with SecuritySpy.

    I have two instances of SecuritySpy, on two Macs, remote and home. I'm using it back up in real time to back up video files between each other. (In this case I only have the upload bandwidth for motion videos, not full time lapses.)

    - Install the Sync program on the first computer, and tell it you want to share a folder. For example, /Users/you/Documents/SecuritySpy/. This will generate a long key phrase (like "A2NWXQ5FHGYMBZUT5FNX4O32FWXXK7SGI") that you'll enter into the Sync program on other Macs you want to share this folder with. Leave btsync running (it minimizes to the finder bar), now it's seeding your entire SecuritySpy directory to whichever Mac with the btsync software can provide the key.

    At this point all files would be copied to other Macs running btsync. If you have slow connections it may not be worth uploading entire time lapse videos, in my case I only wanted to sync motion videos. After you start btsync for the first time, it writes a file called ".SyncIgnore" to the folder you wish to share, e.g. /Users/securityspy/Documents/SecuritySpy/.SyncIgnore. This file contains a list of filenames/wildcards to ignore when syncing.

    Edit this .SyncIgnore file (which already has a few entries for things like .DS_Store), and add in these extensions:
    *.unf
    Backup*.sbf
    *TL*.mov

    This prevents syncing of larger time-lapse videos, any temporary backup files, and avoids the problem of constantly re-syncing the currently-open .unf video files.

    - On other Mac(s) you want to synchronize, install the btsync software. Add a folder to sync, and provide the long code that was provided on the first mac, along with where you wish to copy the files to. For naming consistency sakes, on the home computer I used the folder name "Documents/SecuritySpy-remote" to contain the files from the remote instance. (Likewise at the remote side I'd call it Documents/SecuritySpy-home")

    - Leave and minimize the btsync software at the remote location. Now whenever a motion file is written, it's automatically sync'd off-site in real time. (You can tell btsync to limit bandwidth if you'd like)

    - Add the Sync program to the SecuritySpy user's Login Items (System Preferences->Users & Groups->Login Items, (+), Applications/BitTorrentSync.

    - Repeat these steps at the remote location to share+synchronize everything at home, and/or other locations Macs.

    The nice thing is, the Sync program is available on everything, Mac, Windows, iOS, Android, Linux, Solaris(!). The software has applications way beyond video files (think photo/document sync), but this is a free and useful implementation.

    In my setup I also have my public Linux server running btsync backing up both Macs, always guaranteeing one copy is available and helping by providing a high-speed source for copies.

    NOTE: I'd advise against using the BitTorrent Sync app on a mobile (e.g. iOS/Android) device to copy SecuritySpy videos. At first I thought this was a pretty good way to view historic videos, but quickly realized if it the phone was out of sync for a couple of days it had to download *everything* to catch up first, which just sucked.

    Sorry if some of these instructions are sort of hand-wavy, I'm happy to clarify anything.

    --bwann
  • This is very interesting, it seems like a great solution for automatic backups or sharing of video files to other computers. Many thanks for posting!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!