43 Folders

43 Folders feed subscription icon - Shiny!Time, Attention, and Creative Work. After 4 years and a lot of productivity pr0n, we’re shifting gears. Re-learn how to use 43 Folders. Then back to work. [»]

”What’s 43 Folders?”
43Folders.com is Merlin Mann’s website about finding the time and attention to do your best creative work.

Geek Throwdown: How to sync two or more Macs?

Enter the Octagon

Here’s an experimental new feature: The Throwdown. Take a problem that lots of people face and tell us your personal favorite way to deal with it — in as much detail and with as much persuasion as you can muster.

Today, a lot of us are living on two or more Macs — which is great, except for the challenge of keeping the contents and settings of multiple machines effortlessly in sync.

Now before you pop in, holler “dot mac,” and jump back on your Segway®, consider that many folks (including your author) are looking for a lot more than simple document syncing and perfunctory preference sharing. How about if your needs are more nuanced:

  • Can it intelligently sync~/Library” stuff like “Preferences” and “Application Support” for your apps (so that Quicksilver, for example, is with you and tweaked to perfection wherever you go)? Is it smart enough to know which items not to sync?
  • Can it do smarter comparisons than “which one is newer?” — consider that someone on 4 or 5 Macs may run into complex versioning problems that currently make .Mac very confused. For text, can it do diff3-style merging?
  • Will it update often enough (and automatically enough) that I can trust when I sit down at a new machine, I’ll know everything’s up to date without checking (or manual re-updating)?
  • Can backups be easily automated? And is it easy to restore across all machines?
  • Does it work for people on airplanes? If your solution requires a live internet connection for active usage (e.g. traditional WebDAV), what happens when that access is no longer available?

You get the idea. You have a system; now tell us about it. Bow to your sensei, then spare no detail.

How do you sync your Macs?

rsync? ChronoSync? Synchronize? Unison? Something you made yourself?

What are using to sync your Macs, and how are you using it?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kieran's picture

Re: Geek Throwdown: How to sync two or more Macs?

I use .Mac for keychains, calendars & bookmarks, etc, and Unison for everything else. I would say that the goal of smart comparison and the goal of full automation are somewhat in conflict. If you know that you will always require the most recent version of a file across all machines then you can automate fully. But I use Unison manually precisely because this isn’t always the case. This is also the reason I keep my backup system separate from the sync stuff.

Merlin Mann's picture

Unison FTW

I imagine that the apps mentioned in the post will tip people to what I have tried. :-)

So far, I’ve found the most success with Unison, which I setup on two machines with great assistance from Ethan Schoonover. It was working pretty well for me, but three pilot errors I had were frustrating:

  1. Lack of drag and drop and a true GUI for configuration
  2. I could never get diffs working right
  3. I never got confident that my automation of Unison was complete and correct

I’ve temporarily abandoned Unison while using [thing under NDA], but I plan to return soon.

I contend that if someone comes up a truly easy-to-use GUI front end to Unison, it might be game over — the feature set is just so powerful, especially when using a remote server + something to automate backups.

In the end, I think all these apps are awesome and powerful, but they’re also almost all a huge pain to configure and update. That’s why a lot of people satisfice with .Mac, IMO.

laurion's picture

Re: Unison FTW

Oh, sure. Ask us questions that get us dreaming of the perfect app.

Introduce Unison (which I love, combined with the surplus storage at DreamHost makes a good backup/sync) as a great tool, profess your love.

Tell us you’ve temporarily abandoned it for something better, but then be unable to tell us anything about it due to NDA.

Cruel, cruel.

aneviltrend's picture

Subversion works pretty well.

I’m a fan of subversion. I’m a student at college now, and I find it very useful to subversion each of my class directories. I have a desktop that I use dynamic dns to access (sadly not a Mac) on which I set up each of the subversion repositories.

Not only do I get version control on every file for my classes, but I can check out the repository onto any computer with subversion and make edits (which I do on my Macbook). And when the semester’s over and I no longer need immediate access to my files, I just delete my local copy on my Macbook - instant space savings, and the repository is still safe on my desktop.

I have a weekly backup script to tarball my repository directory and back it up to an external drive, so my data stays pretty safe.

If I ever need to give a friend access to my class files, it’s no big deal - just adjust the permissions for that repository. No more than a few seconds of work.

I realize that subversion may not work for everybody (especially if you wanted to sync your entire user directory, or if you don’t like using the terminal) but for my needs it has worked wonderfully.

Merlin Mann's picture

Automating Subversion?

How much can Subversion be automated? I’ve always wanted to learn more about it, but I feel like I get stuck at manually checking stuff in (from the command line).

Got a good tip for Subversion noobs?

aneviltrend's picture

Re: Automating Subversion?

People new to subversion (or who don’t want to do much tinkering with the command line) can take advantage of this Finder plug-in to have full access to the commands from within the comfort of the Finder. I haven’t personally tried it out, but I’ve heard good things about it. If you’re really new, you’ll probably want to read up on just what it is with this subversion book.

This makes it easy to use subversion from outside of the command line, but I don’t know if it has some sort of Applescript interface (I’m pretty sure it doesn’t) for automating updates or commits.

I find it useful to update and commit manually rather than at regular intervals (just helps to reduce conflicts if I’m editing the file on more than one machine), but I can’t imagine it to be too hard to automate the process using a shell script.

If you have a repository checked out at ~/college101/, then you can use this small shell script to automate the update and commit from the server:

cd ~/college101/
svn update
svn commit -m "Scheduled update."

Save this script, and add it to your crontab, and you should be set. My word of caution is that if you check out the repository onto multiple machines, and tend to edit similar files, you may start running into conflicts on those files. Remember to commit and update regularly without the script as well.

lanej0's picture

Re: Re: Automating Subversion?

SCPlugin works great, PathFinder also has pretty decent Subversion support built in. Not sure about using SVN to sync two Macs… but as a way to store working files, it’s awesome.

dsandler's picture

Re: Automating Subversion?

I find it useful to update and commit manually rather than at regular intervals …

I concur completely, but I confess that it’s because as a software developer I think in terms of the programmer’s work cycle:

  1. Start from a known good state, on any of your work machines.
  2. Do some work.
  3. When you get to a good stopping place (even if you don’t intend to stop working), send a snapshot of your work to the archives.
  4. GOTO 1 (alternatively, GOTO HOME or BED or PUB)

In svn, step 1 looks like svn up, and step 3 looks like svn commit; the exact incantation changes for git or p4 or what have you, but this is basically the workflow.

Of course, if this isn’t your workflow, working with a version-control-style system will seem awkward and painful.

I bet, however, that you already go through all these steps if you currently use a mirroring solution (rsync/Unison):

  1. Start from a known good state, on any of your work machines.
  2. Do some work.
  3. GOTO 1

The trick is that there’s an assumed step 2.5 in which your work magically gets synchronized elsewhere. If you’re using an always-on computer, you can hire a house-elf to take care of this for you (scheduled backup); laptop users have to insert this step manually by invoking Unison or what have you.

So, all this is a long way of saying, “if you’re afraid of the checkin/checkout work style, you may already be using it (and in denial).”

sunblush's picture

SVN hooks

You can also use cron or hook scripts with SVN to do various powerful backup-related tasks. For example, store a hot-backup every hour, or dump the latest revision in text form with each and every commit. Semi-painful to set up, but if that ain’t automation…

The main thing I don’t like about syncing with Subversion is that it forces you to put up with .svn folders everywhere. It is a bit unwieldy for this type of application.

algal's picture

subversion (SVN) is a poor choice for generic synching

I have used subversion for years. It’s great for automated backup and synching of a tightly integrated group of files that don’t change too much, like all the files in a coding project. But it’s a bad choice for general synching because of its fussy handling of file creation/deletion and because of its incompatibilities with subtleties of the OSX file system. There are three main problems:

1) SVN requires special workflow for adding and deleting files.

As long as you’re only modifying files in a predefined set, SVN requires little handholding. You just do an “update” command at the beginning of your work session and a “commit” command at the end. But if you want to create a new file, or delete an old one, it is not enough to create or delete it in the Finder. You need to issue an explicit “add” or “delete” command to subversion. The same is true every time you create or delete a directory.

2) SVN isn’t aware of bundles.

The last issue becomes a real pain when you also consider that SVN is unaware of file bundles. A lot of files in OS X are in fact directories, which the Finder presents as a single file. But SVN just sees it as a directory. So what happens when a file within the pseudo-file bundle is created or deleted? Then SVN requires you to go inside the file bundle and do the explicit add or delete command on the files within. This is a common problem with apps like OmniOutliner, that use file bundles for their document format.

The workaround is to always compress the bundle into a zip file or a dmg, and then handle that through SVN, but this is a nuisance.

3) SVN obliterates metadata

SVN was designed for a standard unix filesystem like ext2, and so it loses a lot of the metadata that is unique to the HFS+ filesystem used by OS X — extended attributes (used by apps like Skim.app), resource forks (I think), ACL’s, etc.. This isn’t always a big deal. But it’s one more thing to worry about.

About Merlin Mann

Merlin Mann's picture

Bio

Merlin Mann is an independent writer, speaker, and broadcaster. He’s best known for being the guy who started the website you’re reading right now. He lives in San Francisco, does lots of public speaking, and helps make cool things like You Look Nice Today. Also? He looks like this, answers questions, and has something like a life.

Merlin’s favorite thing he’s written recently is a short essay called, “Better.”

 
EXPLORE 43Folders THE GOOD STUFF

An Oblique Strategy:
Not building a wall; making a brick


STAY IN THE LOOP:

Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed

Inbox Zero

The original 43 Folders series looking at the skills, tools, and attitude needed to empty your email inbox — and then keep it that way. Don’t miss the free video of Merlin’s Inbox Zero presentation.

Making Time

3-part series on attention management for artists and makers. Read Bad Correspondence, The Job You Think You Have, and One Clear Line.