Friday, January 25, 2008

Tool Of The Day: Unison

For some time now, I've been using rsync to keep my thumb drive in sync with my laptop. This is useful, so I can grab podcasts and other media, put them in a local directory and run a script to make sure my thumb drive has the most up to date contents. It's also useful, in case I lose my thumb drive - I can just rsync the files up.

But lately, rsync has been acting strangely, crashing with odd Cygwin errors. Rather than fight with it, I thought I'd look for an alternative. And that's what I found: Unison.

Unison will sync up two directories, even across a network apparently, doing the Right Thing to make sure the newest files are always saved. I ran it like so:


  cd /home/ben/projects/thumby       # my thumb drive root directory
  unision . e:                       # this assumes that the thumb drive is on E:\

The command plodded along the first time, building up an index of both files. When it ran into a conflict, it had me manually tell it which file to save.

The command is simple and reliable. There's lots you can do with it, and I'm tempted to see if can be a better deployment tool than sitecopy. Definitely worth checking out.

The tool is created by the good folks at U Penn, Shira's alma mater. I can't resist adding: Finally, I got something for free from the University of Pennsylvania, with all the school loans we've paid, it's about time! There, I feel much better.

No comments:

Post a Comment