I realize it's been over a year since my last post, and I have a bunch of stuff stacked up. But this was pretty slick and frankly, I don't want to lose it. So here goes.
do shell script "/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper >/dev/null 2>&1 &"
property nullStr : ""
set defaultSrc to "/path/to/project/dir"
set defaultDest to "/path/to/destination/dir/in/Dropbox"
--- cancel actions from either of these dialogs will effectively cancel the script
set dropBoxSource to text returned of (display dialog "Dropbox backup source?" default answer defaultSrc)
set dropBoxDest to text returned of (display dialog "Dropbox backup destination?" default answer defaultDest)
if dropBoxSource is not equal to "" and dropBoxDest is not equal to "" then
set rsyncCmd to "rsync -rav " & dropBoxSource & " " & dropBoxDest
display dialog ("Run: '" & rsyncCmd & "'")
--- if the user cancels the dialog here, the rsync won't run. this is just what we want :)
--- set a 2-hour timeout for the rsync command
with timeout of 7200 seconds
do shell script rsyncCmd