Unison
There’s a possibility that I might be able to get a new desktop Mac (most likely an iMac) at work, which would mean that a) I’d have a much faster machine for work (my G4 12” PowerBook is starting to show its age a little), b) I’d have a bigger screen, c) I’d mostly be able to leave my PowerBook at home for working in the evenings and weekends. Since I’m going to be commuting more by bike soon, not having to worry about my laptop bouncing about in a pannier will be quite welcome, not to mention lightening the load to haul quite a bit.
But that raises another problem — synchronising the files on both machines. I’m lucky enough to have 25 lovely GB of secure storage space on Strongspace, so I’m thinking that I might use that as a ‘hub’, and use Unison to sync files to and from my desktop and laptop to Strongspace. The idea would be that I’d finish at work, unison my files to Strongspace, go home, unison those changed files to my laptop, work there, unison the changes back to Strongspace, and so on. One slight difficulty is that it seems that the Strongspace servers no longer have Unison, but with Macfuse and sshfs, I should be able to mount Strongspace locally, run unison on the local mount-point then unmount when it’s done.
I’m wondering if any of you clever and resourceful geeks out there have any tips for using Unison with Mac OS X? I’m not going to sync everything between the two machines, so I’ll have to do some clean up of my home directories so that I can partition what will and will not be synced between the machines. That should be fairly easy for the main folders in my home, but I would like to sync some files in ~/Library, which could be tricky. Has anyone got experience of using symlinks to collect together specific files to sync? Are there issues, for example, syncing mailboxes in ~/Library/Mail (I use a mixture of POP and IMAP accounts, and have quite a bit of mail in local mailboxes) or Yojimbo databases between machines?

1
Strongspace does rsync over SSH, why not go that way?
by Doug Miller @ 12/03/2007 7:32 pm • Permalink •
2
Because Unison is much better built for this. Rsync is great for one-way backups, but Unison is made for this exact use case.
by Stephen Waits @ 12/03/2007 11:35 pm • Permalink •
3
I'll recommend remote desktop.
by Christer Nilsson @ 13/03/2007 8:07 am • Permalink •
4
Just a thought—relying on storage on the intarwub means you will be dealing with network latency when syncing from either machine.
If you install something like Subversion on one machine and use this for syncing, then you avoid this latency half of the time.
by Martin Polley @ 13/03/2007 8:37 am • Permalink •
5
Ah, Martin got there 'fore I did. Subversion is the way to go.
There's plenty of hosting services who'll let you use them as SVN repositories, too, so you could probably even use rousette.org.uk (or something else entirely, of course) as your repository, do an SVN commit each day to your remote area, and dad-da-la-dadda-da-da, job done.
by Lyle @ 13/03/2007 9:51 am • Permalink •
6
Well, a little bit of experimenting with a small directory syncing via SSHFS and using Unison was not promising. I suspect that I'm just missing some switch to enable extended attributes or something, but all was not well and there were loads of errors. sshfs is pretty alpha, so I think that's not going to be workable for a 'production' system.
So, to the other methods you suggested. Yes, I know that Rsync would work pretty well. After all, with my hub/spokes system, if I was disciplined and if everything went OK then Rsync would act exactly the same way as unison. But the problem would be if something went wrong, or I wasn't disciplined - then unison would probably be better able to cope with resolving the problems than Rsync which is essentially one-way.
As for subversion, I use it all the time for Tracks development, but I wonder how well it would cope with a huge, diverse set of files from my home directory. With a fair few binary files, I suspect that the .svn directories would grow pretty big. I can use subversion with Strongspace by creating the repository locally and then copying it across. From then on, it would work as normal for checking in and out. On the plus side, you've got versioning, which would be good, but I suspect it would be a bit more problematic to maintain than either Rsync or Unison.
Hmm. What to do...
by bsag @ 13/03/2007 6:34 pm • Permalink •
7
Have you looked into setting up a portable home directory on OS X Server? This approach would work for you — if you have or can get access to a server.
by n8 @ 14/03/2007 2:34 am • Permalink •
8
Have you considered using external media – flash drive or portable HD instead of remote server? This way you still can use Unison and carry (ideally) a small thumb drive in your pocket instead of a laptop.
by Dobromir Tzankov @ 15/03/2007 7:48 am • Permalink •
9
Not being competent enough for anything technical I just use FolderShare (sorry!) for synching specific folders on a desktop, notebook and MacBook. Works as a backup and for access to files when working around the world. I'm a bit paranoid about backups so I then replicate to a spare drive in the pc AND backup to a locked away hard drive. I work for myself!
by Julian @ 15/03/2007 10:02 am • Permalink •
10
If you do opt for an external drive, I recommend taking a look at ChronoSync.
http://www.econtechnologies.com/site/Pages/ChronoSync/chrono_overview.html
by DaveA @ 16/03/2007 4:45 am • Permalink •
11
n8: Well, that would be lovely, but unfortunately I don't have access to OS X Server (or any server with a decent amount of space), so that's out.
Dobromir Tzankov and DaveA: I did consider a small external dirve (I don't think a thumb drive would have enough capacity), but one thing I like about backing up to Strongspace is that I have a backup of all my important files on a well-maintained and backed up server on another continent (I also back up to a hard drive here, of course) Being web accessible also means it's accessible anywhere I can get web access, which is good.
Julian: A similar idea, but since I've already got all this free space on Strongspace, I don't want to use another service.
I've been looking into this more, and found a nice distributed version control system called Bazaar which I like a lot. It's a bit less fussy than Subversion, and seems like it might have slightly lower overheads. You can also use it on any SFTP-accessible server, without installing anything on the server, which is ideal. Since I don't have the second computer yet, I'm going to set this up gradually just versioning my laptop with Bazaar and see how it goes. I can always revert to rsync if neccessary.
by bsag @ 16/03/2007 8:33 am • Permalink •
12
Let me know if you ever figure this out. I too am searching for the perfect backup solution to Strongspace.
by jonto @ 18/03/2007 4:10 pm • Permalink •
13
I opened a ticket about this on the Strongspace support site, but haven't heard back (there's an old post in the forums where they say they will be installing unison soon).
In the meantime, I'm using Interarchy's two-way mirror feature on my Mac to do it. My only complaint is that it doesn't interactively resolve conflicts. On the other hand, it does report them, and instead of deleting the conflicting version, it renames it to .bak.
by Brian Jepson @ 04/04/2007 4:06 pm • Permalink •
14
Thanks for posting about this, I was thinking of doing the same trick with Unison and sshfs. I'm learning Applescriptand Interface Builder by making a nice little front-end for syncing OS X folders to a server that is running unison.
While I work on the front end, I'm using a shell scriptprocess that runs every hour via cron to sync my home directory using unison to a Dreamhost server. I sync everything except my media and cache files. But, I only have one Mac. The other computers are Linux and Windows, so I can't be much help to you about which files cause conflicts.
One thing you can do is synchronize both Library directories to the server as separate directories, then sync both directories back to each computer. I.e. Mac1 Library <=> server/Library1, Mac2 Library <=> server/Library2, Mac1 OtherLibrary <=> server/Library2, Mac2 OtherLibrary <=> server/Library1. This way you can be conservative about which files from Library are synchronized directly, without worrying that you'll miss a crucial file that you desperately need in some situation.
by Nathan Whitehead @ 16/04/2007 5:52 am • Permalink •
Page 1 of 1 pages