View Single Post
Quote:
Originally Posted by marhar View Post
Can you post an example rsync script? Of course they would be unsupported, disclaimed, etc.
Sure! First, I have all of my accounts push their OmniFocus data to a central server every half hour. This central server could be .Mac, but in my case I just push to a Mac that I always leave running (we'll call it "example.org"). So, here's the crontab entry I install everywhere:

Code:
#
# Mirror current Focus data to example.org
#
*/30 * * * * /usr/bin/rsync -az --delete ~/Library/Application\ Support/OmniFocus/. example.org:Mirrors/$(hostname -s)/OmniFocus/.
I use zsh, so in all my .zshenv files I've defined two shell functions: one which publishes manually (called "push-focus") which I use before putting my laptop to sleep (since cron can't run while it's asleep), and one which rsyncs a specific remote mirrors back to my local computer:

Code:
function push-focus() {
    /usr/bin/rsync -vP -az --delete $* ~/Library/Application\ Support/OmniFocus/. example.org:Mirrors/$(hostname -s)/OmniFocus/.
}

function sync-focus() {
    if [ "$1" = "" ]; then
        echo "Usage: sync-focus hostname"
    else
        echo "Syncing from $1"
        rsync -avP -z --delete example.org:Mirrors/$1/OmniFocus/Perspectives ~/Library/Application\ Support/OmniFocus/
        rsync -avP -z --delete example.org:Mirrors/$1/OmniFocus/'OmniFocus.ofocus*' ~/Library/Application\ Support/OmniFocus/
    fi
}
When I sit down at home in the evening, I say "sync-focus hypno" and when I sit down at work in the morning, I say "sync-focus jamethiel". I then close and reopen my document in OmniFocus, it complains that it's locked by the other computer, I click "Override" and start working.

This approach is not ideal, I know. Did I mention that we're working on synchronization for 1.1? :) But since you asked, I thought I'd share what I'm doing for what it's worth.

Tom Negrino's screen sharing approach seems much simpler than my rsync commands. (Though, unfortunately, it loses Quick Entry and the Clipping service, both of which I use heavily.)