<?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>Blog dot Melimato dot Com &#187; Uncategorized</title>
	<atom:link href="http://blog.melimato.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.melimato.com</link>
	<description>Those things we do</description>
	<lastBuildDate>Fri, 29 Jul 2011 09:24:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Long time no see&#8230;but we&#8217;re back!</title>
		<link>http://blog.melimato.com/long-time-no-see-but-we-are-back/</link>
		<comments>http://blog.melimato.com/long-time-no-see-but-we-are-back/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 08:51:27 +0000</pubDate>
		<dc:creator>pedro</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.melimato.com/?p=255</guid>
		<description><![CDATA[We have been really busy the last year or so, so it has been a really loooong time since we posted regularly. We promisse to try and post more regularly, once every week or so&#8230; Hope you enjoy!]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.melimato.com%2Flong-time-no-see-but-we-are-back%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.melimato.com%2Flong-time-no-see-but-we-are-back%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>We have been really busy the last year or so, so it has been a really loooong time since we posted regularly.<br />
We promisse to try and post more regularly, once every week or so&#8230;</p>
<p><span id="more-255"></span></p>
<p>Hope you enjoy!</p>
<div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://blog.melimato.com/long-time-no-see-but-we-are-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping directories in sync with unison</title>
		<link>http://blog.melimato.com/keeping-directories-in-sync-with-unison/</link>
		<comments>http://blog.melimato.com/keeping-directories-in-sync-with-unison/#comments</comments>
		<pubDate>Fri, 08 May 2009 23:24:09 +0000</pubDate>
		<dc:creator>pedro</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[unison]]></category>

		<guid isPermaLink="false">http://blog.melimato.com/?p=104</guid>
		<description><![CDATA[As opposed to rsync, unison is a two way file synchronizer. Similar to MySQL&#8217;s master to master replication. To set it up in Ubuntu (Intrepid) keep on reading&#8230; 1. Install unison on both servers apt-get install unison 2. Create a script to add to crontab to call unison periodically unison -numericids -owner -silent -times -contactquietly [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.melimato.com%2Fkeeping-directories-in-sync-with-unison%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.melimato.com%2Fkeeping-directories-in-sync-with-unison%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>As opposed to rsync, unison is a two way file synchronizer. Similar to MySQL&#8217;s master to master replication. To set it up in Ubuntu (Intrepid) keep on reading&#8230;</p>
<p><span id="more-104"></span></p>
<p>1. Install unison on both servers</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</pre></div></div>

<p>2. Create a script to add to crontab to call unison periodically</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">unison <span style="color: #660033;">-numericids</span> <span style="color: #660033;">-owner</span> <span style="color: #660033;">-silent</span> <span style="color: #660033;">-times</span> <span style="color: #660033;">-contactquietly</span> <span style="color: #660033;">-batch</span> <span style="color: #660033;">-auto</span> <span style="color: #660033;">-log</span> <span style="color: #660033;">-logfile</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>unison.log profile_file <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span></pre></div></div>

<p>3. Create the above mentioned profile file on ~/.unison/profile_file.prf</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root = <span style="color: #c20cb9; font-weight: bold;">ssh</span>:<span style="color: #000000; font-weight: bold;">//</span>server_ip<span style="color: #000000; font-weight: bold;">//</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span>
root = <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span>
ignore = Regex .<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>cache<span style="color: #000000; font-weight: bold;">|</span>Cache<span style="color: #000000; font-weight: bold;">|</span>te?mp<span style="color: #000000; font-weight: bold;">|</span>logs?<span style="color: #7a0874; font-weight: bold;">&#41;</span>.<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #666666; font-style: italic;"># ignore log and cache files</span></pre></div></div>

<p>That&#8217;s it! Now add the following line to your crontab to execute it every 5min</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*/</span><span style="color: #000000;">5</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>my_unison_script.sh</pre></div></div>

<p>After a few days of running this I found that sometimes one unison execution would overlap another. To resolve this I found a little tool called <a href="http://unixwiz.net/tools/lockrun.html">lockrun</a></p>
<p>To get it to work I did:</p>
<p>1. Download the source code from the official <a href="http://unixwiz.net/tools/lockrun.c">lockrun website</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>unixwiz.net<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>lockrun.c</pre></div></div>

<p>2. Build/install as shown in <a href="http://unixwiz.net/tools/lockrun.html">http://unixwiz.net/tools/lockrun.html</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">gcc</span> lockrun.c <span style="color: #660033;">-o</span> lockrun
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> lockrun <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>3. Change the previous crontab line to use lockrun</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*/</span><span style="color: #000000;">5</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>lockrun <span style="color: #660033;">--lockfile</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>hosting.lockrun <span style="color: #660033;">--</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>my_unison_script.sh</pre></div></div>

<p>All done!!!</p>
<div id="wherego_related"> </div>]]></content:encoded>
			<wfw:commentRss>http://blog.melimato.com/keeping-directories-in-sync-with-unison/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to sync date/time in Ubuntu Intrepid</title>
		<link>http://blog.melimato.com/how-to-sync-datetime-in-ubuntu-intrepid/</link>
		<comments>http://blog.melimato.com/how-to-sync-datetime-in-ubuntu-intrepid/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 14:55:39 +0000</pubDate>
		<dc:creator>pedro</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[chrony]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ntp]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.melimato.com/blog/?p=9</guid>
		<description><![CDATA[In order to keep my servers always showing the correct date/time I use a little software called chrony and make sure I&#8217;m using the correct time zone. All the actions below need superuser privileges To install it simply use apt-get: $ apt-get install chrony Once you&#8217;ve installed chrony you need to select your current time [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.melimato.com%2Fhow-to-sync-datetime-in-ubuntu-intrepid%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.melimato.com%2Fhow-to-sync-datetime-in-ubuntu-intrepid%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In order to keep my servers always showing the correct date/time I use a little software called <a href="http://chrony.sunsite.dk/" title="chrony website">chrony</a> and make sure I&#8217;m using the correct time zone.</p>
<p><span id="more-9"></span></p>
<p><strong>All the actions below need superuser privileges</strong></p>
<p>To install it simply use apt-get:</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> chrony</pre></div></div>

<p>Once you&#8217;ve installed chrony you need to select your current time zone:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ tzselect</pre></div></div>

<p>To make sure it is selected on every boot I just export the TZ environment variable in my /etc/rc.local</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.local</pre></div></div>

<p>And add the following lines:<br />
# Export timezone<br />
TZ=&#8217;Europe/Brussels&#8217;; export TZ</p>
<p>I found doing the above was not enough, so I also edited my /etc/timezone file and added the correct time zone there:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Europe/Brussels&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>timezone</pre></div></div>

<p>And still it wasn&#8217;t enough, so I reconfigured the package tzdata</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ dpkg-reconfigure tzdata</pre></div></div>

<p>And finally that did it! To make sure it would still be correct on a future reboot I rebooted my machine:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ reboot</pre></div></div>

<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.melimato.com/how-to-sync-datetime-in-ubuntu-intrepid/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

