Unison File Synchronizer

Filed under: Uncategorized. Tags: ,

I’m trying out Unison File Synchronizer as a way to keep my two machines at work in sync. Unison inherits many concepts from source code management tools like CVS and SVN, and can manage bidirectional updates (even merges). I’ve done a test sync, firing the contents of my Powerbook over on top of my deskop’s home directory. It took only about 20 minutes or so to copy stuff over, but a long, tedious process of approving or reconciling conflicts made the process last many times longer than that.

It would be cool if Unison could have a flag that said “hey, if there’s a conflict, trust the Powerbook, and blow away the desktop” or vice versa. So I didn’t have to hit “.” for each of 20,000 files…

There are precompiled binaries for MacOSX, including both a GUI and command-line app. I had zero luck with the GUI version, but the command-line app was trivial to use.

If this works out, it will replace the last function that I rely on my now doomed .Mac account for…

Update: Between having multiple sync profiles, and being able to set the -auto and/or -batch flags, this could be a very usable solution! I’ve tried disabling .Mac sync for a while to see if I miss it.

Comments

5 Responses to “Unison File Synchronizer”

  1. Unison User says:

    Have you tried the -force switch? It does exactly what you’re looking for: it resolves all conflicts in the favour of the named root.

  2. D'Arcy says:

    Sweet! That’s perfect! I also have a “quick” profile for my Safari bookmarks etc… and will try using FileMerge (a gui to diff) to merge the two sets of bookmarks rather than just clobbering one copy with the other.

    -force will totally come in handy for doing an occasional clone of one of my systems. Thanks for the tip!

  3. MH says:

    If you want to do a clone from one system to another, the best tool to use is rsync, it is typically more efficient than unison
    i.e.
    rsync -e ssh -av host:source_path host:dest_path

    It can also be useful to do this before invoking unison for the first time so that unison doesn’t have to do much work making sure both directories are copies of each other.

  4. D'Arcy says:

    Thanks for the tip! I’ve caught myself getting sloppy with backups simply because they take so darned long… If rsync makes that easier/faster/more efficient, I might be more likely to run the backup more often…

Leave a Reply