Syncing data between machines hasn’t been an issue for me over the last 3 years because my PowerBook has been my primary development machine. Now that I’m back on a desktop as my primary machine, it’s something I have to deal with again.
Let’s take browser bookmarks as an example. I still want to keep my PowerBook updated with my web toolset; a toolset that includes a number of bookmarks and bookmarklets which are used in conjuction with LaunchBar.
Before it is suggested, del.icio.us is great for social bookmarks, but it’s really more of a public browsing history with notes than it is a way to manage traditional bookmarks. There are other solutions out there that let you store your bookmarks online and/or sync them between machines, but they just don’t work (or interoperate with other apps like LaunchBar) as well as native application bookmarks do.
I’ve solved this problem with what I consider to be a rather clever solution (though perhaps there are dozens of developers out there already doing the same thing): check my bookmarks.plist into Subversion and check it out on each of my machines. When I add a bookmark on one machine, I just check it in and update on the other machine – and vice versa.
I’m not a Subversion whiz so there may be a better way to do this1, but this is how I set it up:
- First, make sure Camino isn’t running.
- I created a “camino” directory in my subversion repository, added the current bookmarks.plist (in “Application Support/Camino” to it and checked it in.
- Since I couldn’t figure out a way to check out an individual file from Subversion2, I went into my “Application Support” directory and checked out the “camino” directory I’d created in step 2 as “Camino-svn”.
- Now copy the contents (you don’t have to copy the bookmarks.plist file, but it doesn’t matter) of the “Application Support/Camino” directory to the new “Application Support/Camino-svn” directory you created in step 3.
- Delete the “Application Support/Camino” directory and rename the “Application Support/Camino-svn” directory to “Application Support/Camino”.
- Launch Camino and use normally.
Repeat on all computers you want to sync bookmarks between. Whenever you add a bookmark on a computer, just commit the changes and update on the other machines. For Camino, you don’t even need to quit the program before checking in your changes – bookmark changes are written to the bookmarks.plist file immediately. I may set up a CRON job to do the update every 24 hours or so on each machine. Maybe I should make the CRON job an AppleScript that quits Camino (saving any window/tab URLs), updates the bookmarks, relaunches and restores the windows/tabs. Lots of fun possibilities.
This technique should work with Firefox3 as well – really with any browser or data that is stored in a text file. I also set up my Mail.app rules (Library/Mail/MessageRules.plist) and smart mailboxes (Library/Mail/SmartMailboxes.plist).
Well, what you’re doing is certainly flexible for any kind of data [and, well, all kinds of data], but there’s a Bookmarks Synchronizer extension for FF, one I imagine could be ported to how Camino does things. [Of course, the extension is currently out-of-sync with FF development; I’m missing it right now.]
I keep all my settings synchronised by always SSH’ing (must get X) to a single machine that acts as a server. The other machines are used merely as terminals; and yet, I assume you always are connected — fast WiFi or Ethernet.
This can be done with Windows and Apple Macs although, if you steer way from*nix, that might involve complications when it comes to applications, utilities or commerical software (Windows in particular). It is worth emphasising that you need only install software once — on the server.
Same everything, different hardware, from different locations, at any time (provided you do not mind electricity bills for workstations that are constantly on). I always leave my machines switched on because I often find that it’s good return (productivity) on investment.
The bookmark synchronizer extension for Firefox (http://extensionroom[...]nfo/booksync) does basically the same thing, using FTP as the medium. I can’t speak how well it would integrate with LaunchBar, but since it’s passing around the actual XML file I don’t know what the difference would be.
I looked at the bookmark synchronizer extension – it isn’t clear to me if it actually merges (and handles collisions) like SVN does.
Regardless, it doesn’t work for Camino (or my Mail.app settings, BBEdit prefs, etc.).
Alex, I can speak for it merging disparate bookmarks sets: I had a wholly separate environment between home and work, and after using it in both places, I suddenly had the same set in both places.
It’s not ideal; I’d love to have options to say, “Sync bookmarks in this folder but not in this one,” because a lot of my server management tools require access to HTTP ports that are blocked at work. It does, however, do a good job.
Given that you’re syncing more than simple bookmarks, I’d say you definitely have a setup that works for you. 🙂 Thanks for sharing!
You could also use Rsynch (which I believe you’re already using for your backups). Subversion does offer the ability to fall back to a previous version, although I don’t think that’d be a huge need in this context.
In either case, you could schedule auto-updates via cron, which would be kinda cool.
Where’s the bookmarklet that reads / writes all your bookmarks to a Tasks Pro note? 🙂 Now THAT would be cool…
I don’t think rsync handles merging and collisions.