Unison to keep files synced.

I saw this article on Linux Journal and decided that I had to check it out; especially since installing unison for Mandrake is as easy as urpmi unison.

I had been using rsync to keep certain local and remote directories in sync, but I found that I would have to always remember which had the most recent data so I didn’t clobber my files; unison seems to do a far better job of merging conflicts.

My first test was to sync my IRC logs from #nblug:

unison .gaim/logs/irc/augie@irc.nblug.org/ ssh://linux/.gaim/logs/irc/augie@irc.nblug.org/

Success!

Now for the same thing but with less typing (over the long term); I create a file called irc.nblug.prf under the .unison directory like so:

root = .gaim/logs/irc/augie@irc.nblug.org/
root = ssh://linux/.gaim/logs/irc/augie@irc.nblug.org/

Now when I want to synch the two directories up it is as simple as unison irc.nblug .

This entry was posted in General, work and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>