<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yet another web log &#187; Unison</title>
	<atom:link href="http://blog.philippheckel.com/tag/unison/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.philippheckel.com</link>
	<description>Life, Linux and other things</description>
	<lastBuildDate>Tue, 24 Aug 2010 05:24:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Unison &amp; multiple hosts: &#8220;Warning: inconsistent state.&#8221;</title>
		<link>http://blog.philippheckel.com/2008/10/25/unison-and-multiple-hosts-warning-inconsistent-state/</link>
		<comments>http://blog.philippheckel.com/2008/10/25/unison-and-multiple-hosts-warning-inconsistent-state/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 16:18:34 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Synchronization]]></category>
		<category><![CDATA[Unison]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/10/25/unison-and-multiple-hosts-warning-inconsistent-state/</guid>
		<description><![CDATA[As some of you might know, Unison is this great tool that allows bidirectional synchronisation of two hosts, &#8211; no matter which operating system they&#8217;re running&#8230; Well, at least the well known ones are supported. Since Unison can also be used to sychronise more than two hosts, it&#8217;s perfect for big amounts of data that [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you might know, <a href="http://www.cis.upenn.edu/~bcpierce/unison/">Unison</a> is this great tool that allows bidirectional synchronisation of two hosts, &#8211; no matter which operating system they&#8217;re running&#8230; Well, at least the well known ones are supported.</p>
<p>Since Unison can also be used to sychronise more than two hosts, it&#8217;s perfect for big amounts of data that has to be shared in a team. </p>
<p>A scenario like this is possible and works for me: UserA &lt;-&gt; Server &lt;-&gt; UserB.<br />
But of course, also other users could sync with the server. Unison rocks!</p>
<p>Today, after reinstalling his OS, my friend got the following error message:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Warning: inconsistent state.  
The archive file is missing on some hosts.
For safety, the remaining copies should be deleted.
  Archive are96968da50882488164ef52510703a8e on 
     host &amp;lt;UserAs-local-hostname&amp;gt; is MISSING
  Archive ar664775fc717afcf6cc46edbc47d25641 on ...</pre></div></div>

<p><span id="more-15"></span></p>
<h3 id="toc-the-easy-solution">The easy solution</h3>
<p>Unison keeps archive-files for each pair it synchronises with. One on each host, i.e. one on your local PC (UserA) and one on the server, both stored in a folder called <em>~/.unison</em> and looking like the files above.</p>
<p>The easiest solution would be to just <strong>delete all archive-files</strong> on the server as unison suggests. <strong>But</strong> that would result in a situation where all the other users that sync their files with the server would have to do a slow sync which is <em>extremely slow</em> and sometimes takes more than 20 minutes for large folders (e.g. > 10 GB).</p>
<h3 id="toc-the-best-solution">The best solution &#8230;</h3>
<p>&#8230; is to just delete the required archive-files on the server. Pretty easy, that&#8217;s how it works:</p>
<p>Log on to the server (assuming that it&#8217;s a Linux machine, but it certainly works similar for any other system) and find the relevant archive files:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> mysyncuser<span style="color: #000000; font-weight: bold;">@</span>mysyncserver.com
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.unison
$ <span style="color: #c20cb9; font-weight: bold;">fgrep</span> <span style="color: #ff0000;">'//UserAs-local-hostname/'</span> <span style="color: #c20cb9; font-weight: bold;">ar</span><span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>You should get something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Binary file ar664775fc717afcf6cc46edbc47d25641 matches</pre></div></div>

<p>Delete the listed files and it should work like a charm. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/10/25/unison-and-multiple-hosts-warning-inconsistent-state/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unison 2.27.57 on Debian Etch and Ubuntu Hardy</title>
		<link>http://blog.philippheckel.com/2008/05/16/unison-2-27-57-on-debian-etch-and-ubuntu-hardy/</link>
		<comments>http://blog.philippheckel.com/2008/05/16/unison-2-27-57-on-debian-etch-and-ubuntu-hardy/#comments</comments>
		<pubDate>Fri, 16 May 2008 00:47:32 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Synchronization]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unison]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/05/16/unison-22757-on-debian-etch-and-ubuntu-hardy/</guid>
		<description><![CDATA[The good thing about the file sync tool Unison is, that it&#8217;s available for several operating systems. This is great for groups working on different systems (Mac, Linux and Windows) but want to share and synchronize files on a remote server. Well, the bad thing about Unison on the other hand is, that its backwards [...]]]></description>
			<content:encoded><![CDATA[<p>The good thing about the file sync tool <a href="http://www.cis.upenn.edu/~bcpierce/unison/">Unison</a> is, that it&#8217;s available for several operating systems. This is great for groups working on different systems (Mac, Linux and Windows) but want to share and synchronize files on a remote server.</p>
<p>Well, the bad thing about Unison on the other hand is, that its backwards compatibility is anything but great, so that you have to make sure that everybody in the team uses the same version. And this can be tricky depending on what system you are using.</p>
<p>My home system is Ubuntu Hardy, the remote server system is Debian Etch. Both come with Unison 2.16.13 which would be great if not Apple&#8217;s new Leopard brings the newest version 2.27.57. Long story short, I needed the newest version on Hardy and Etch.</p>
<p><span id="more-3"></span></p>
<h3 id="toc-unison-on-hardy">Unison on Hardy</h3>
<p>To install the newest version of Unison on Hardy, it&#8217;s the best to just use the existing Backport package.</p>
<p>First, add the backports to the apt-sources, using your favorite editor, e.g. vi or nano:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> editor <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list</pre></div></div>

<p>Look for <em>backports</em> and uncomment/add the following lines:</p>

<div class="wp_syntax"><div class="code"><pre class="apt_sources" style="font-family:monospace;"><span style="color: #00007f;">deb</span> <span style="color: #009900;">http://de.archive.ubuntu.com/ubuntu/</span> <span style="color: #b1b100;">hardy-backports</span> <span style="color: #b16000;">main</span> <span style="color: #b16000;">restricted</span> <span style="color: #b16000;">universe</span> <span style="color: #b16000;">multiverse</span>
<span style="color: #00007f;">deb-src</span> <span style="color: #009900;">http://de.archive.ubuntu.com/ubuntu/</span> <span style="color: #b1b100;">hardy-backports</span> <span style="color: #b16000;">main</span> <span style="color: #b16000;">restricted</span> <span style="color: #b16000;">universe</span> <span style="color: #b16000;">multiverse</span></pre></div></div>

<p>Then just install the backport using <em>apt-get</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> hardy-backports <span style="color: #c20cb9; font-weight: bold;">install</span> unison</pre></div></div>

<p>After installing you probably should remove the added lines from the <em>sources.list</em>-file. Otherwise the update-manager wants to install all available backports which is probably not what you want.</p>
<h3 id="toc-debian-etch">Debian Etch</h3>
<p><strong>Update 30/07/08:</strong> Before reading my post, please have a look at the much easier method described by <a href="#comment-3">Andrew</a> in the user comments. Only if this doesn&#8217;t work, you might want to have a look at my post.</p>
<p><strong>Unison 2.27.57 binary for Debian Etch</strong>:<br />
If you don&#8217;t want to compile the binary on your own (as described in the following paragraphs), you can download the <a href="/uploads/2008/05/unison-2.27.57-binary-for-debian-etch.gz">Unison 2.27.57 binary for Debian Etch</a> here.</p>
<p><strong>Update 30/11/08:</strong><br />
~ 300 downloads so far, no known problems/malfunctions!</p>
<p>It&#8217;s much more difficult on an Etch system because no Backport package is available. Therefore you either have to create such a package, which can be annoying and frustrating, or you just <em>compile it on your own and overwrite the binary</em>.</p>
<p>Add the unstable sources and the etch backports to your apt-get sources by editing the file <em>/etc/apt/sources.list</em> (as <em>root</em>!):</p>

<div class="wp_syntax"><div class="code"><pre class="apt_sources" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Unstable source packages</span>
<span style="color: #00007f;">deb-src</span> <span style="color: #009900;">ftp://ftp.de.debian.org/debian/</span> <span style="color: #b1b100;">unstable</span> <span style="color: #b16000;">main</span> <span style="color: #b16000;">contrib</span> <span style="color: #b16000;">non-free</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># Backports for Etch</span>
<span style="color: #00007f;">deb</span> <span style="color: #009900;">http://www.backports.org/debian</span> etch-backports <span style="color: #b16000;">main</span> <span style="color: #b16000;">contrib</span> <span style="color: #b16000;">non-free</span></pre></div></div>

<p>Now update <em>apt</em> and install the backport package of ocaml compiler. You also might want to install the debian backports keyring to avoid warning and error messages:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> debian-backports-keyring
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> etch-backports <span style="color: #c20cb9; font-weight: bold;">install</span> ocaml</pre></div></div>

<p>Then get the source package of unison 2.27.57 and make the binary:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #7a0874; font-weight: bold;">source</span> unison
$ dpkg-source <span style="color: #660033;">-x</span> unison_2.27.57-1.dsc
$ <span style="color: #7a0874; font-weight: bold;">cd</span> unison-2.27.57<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

<p><em>Note:</em> For my Etch installation, the make progress failed with some error, but the binary was created successfully anyway. Just have a look whether the <em>unison</em>-binary exists and test if it is working.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>unison <span style="color: #660033;">-version</span>
unison version 2.27.57</pre></div></div>

<p>Now install the old version of Unison and replace the binary with the new one. Also you might want to remove the lines from <em>/etc/apt/sources.list</em> and uninstall the ocaml compiler.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> unison
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> unison <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>
$ unison <span style="color: #660033;">-version</span>
unison version 2.27.57</pre></div></div>

<p>That&#8217;s it! I know that this is not the best solution and that it might be better to create the backports package. But as there are many dependencies to other packages it&#8217;s maybe one of the fastest solutions.</p>
<p>I decided to publish the binary here (for the lazy ones): <a href="/uploads/2008/05/unison-2.27.57-binary-for-debian-etch.gz">Unison 2.27.57 binary for Debian Etch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/05/16/unison-2-27-57-on-debian-etch-and-ubuntu-hardy/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
