43 Folders

Back to Work

Merlin’s weekly podcast with Dan Benjamin. We talk about creativity, independence, and making things you love.

Join us via RSS, iTunes, or at 5by5.tv.

”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?

radiusman's picture


I have been toying around with syncing since received a second laptop mac and the best solution I have come up with is to use a combination of rysnc, cronnix, a freeNAS server, applescript, and MarcoPolo.

I put the latest copy of each folder and/or file that I want to keep synced in a special area of the freenas server on my network that both desktop and laptop have access. For every individual file or folders I want to sync I use an individual applescript that houses two rsync commands. Here is the exact applescript I use for my bookmarks sync:

do shell script "rsync -avzr --update ~/Desktop/[NASDRIVE]/SyncData/Bookmarks/Bookmarks.plist ~/Library/Safari/Bookmarks.plist"

do shell script "rsync -avzr --update ~/Library/Safari/Bookmarks.plist ~/Desktop/[NASDRIVE]/SyncData/Bookmarks/Bookmarks.plist"

The current file stored on the NAS of course knows its own last modified date and so do the local copies on each of the two computers. The two rsync commands use these last modified dates know how to sync correctly. The "--update" command in rsync only updates files that are newer.

So the first command tries to see if the one on the NAS drive is newer than the one on the computer. If it is, the it means there was a change made on the other computer so it copies it locally. If it is not newer than it does nothing.

The second command sees if the local version is newer than the NAS version. If it is, it means we made a change locally that needs to be sent to the other computer. It then copies over to the NAS. If not, then it does nothing.

I then use cronnix to run these scripts every hour -- although if you wanted it done more frequently it wouldn't be too much trouble to make it run every few minutes instead.

I also use Marco Polo to automatically run these scripts whenever it recognizes that my macbook pro is on my home network. Therefore if I go out and make a bunch of changes it syncs up as soon as I connect my laptop to the network. My desktop also uses Marco Polo to sense (through bonjour) when the laptop has joined the network and it runs an update as well. This way when I turn on my laptop at home, both computers immediately sync up.

I think that the best thing about this system is that Safari automatically updates itself even if it is running. I don't have to quit and restart after every bookmark sync.

A few caveats:

  1. If changes are made to both systems before a sync then one of the changes will be lost. The best way to get around this is to have them sync more often.

  2. It won't work for iTunes. The way iTunes is designed makes it very difficult to do a 2 way sync. As a result I just do a 1-way "mirroring" from my desktop to my macbook pro.

By far I think this is the best solution. It is probably the most annoying to setup, but after it's done you don't have to think about it ever again.




An Oblique Strategy:
Honor thy error as a hidden intention


Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed


Merlin used to crank. He’s not cranking any more.

This is an essay about family, priorities, and Shakey’s Pizza, and it’s probably the best thing he’s written. »

Scared Shitless

Merlin’s scared. You’re scared. Everybody is scared.

This is the video of Merlin’s keynote at Webstock 2011. The one where he cried. You should watch it. »