<?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>Capi's Corner &#187; synchronization</title>
	<atom:link href="http://www.dont-panic.cc/capi/tag/synchronization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dont-panic.cc/capi</link>
	<description>Development, Network, Security, Ideas &#038; Opinions</description>
	<lastBuildDate>Sat, 10 Dec 2011 19:31:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Syncing your Firefox: Google Browser Sync</title>
		<link>http://www.dont-panic.cc/capi/2007/10/13/syncing-your-firefox-google-browser-sync/</link>
		<comments>http://www.dont-panic.cc/capi/2007/10/13/syncing-your-firefox-google-browser-sync/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 19:11:21 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[computer]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[synchronization]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/2007/10/13/syncing-your-firefox-google-browser-sync/</guid>
		<description><![CDATA[How could I miss this so long? Google Browser Sync keeps Firefox&#8216; bookmarks, sessions, cookies, tabs and even passwords (if you really want to) in sync. As I constantly switch between multiple computers, this is really a nice thing to have. You need to have a Google account, but as I already use Google Reader [...]]]></description>
			<content:encoded><![CDATA[<p>How could I miss this so long? <a HREF="http://www.google.com/tools/firefox/browsersync/">Google Browser Sync</a> keeps <a HREF="http://www.mozilla.com/en-US/firefox/">Firefox</a>&#8216; bookmarks, sessions, cookies, tabs and even passwords (if you really want to) in sync. As I constantly switch between multiple computers, this is really a nice thing to have. You need to have a Google account, but as I already use Google Reader and Calendar, I already have one. In order to hide your data from Google (as if this mattered due the amount they are already collecting about us) you can protect the information by a password (PIN).</p>
<p>I&#8217;m currently trying it out and up to now I am very pleased with it. One more reason to stick with Firefox <img src='http://www.dont-panic.cc/capi/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2007/10/13/syncing-your-firefox-google-browser-sync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharing and Synchronizing Data Across Multiple Computers</title>
		<link>http://www.dont-panic.cc/capi/2007/07/04/sharing-and-synchronizing-data-across-multiple-computers/</link>
		<comments>http://www.dont-panic.cc/capi/2007/07/04/sharing-and-synchronizing-data-across-multiple-computers/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 19:53:48 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[unison]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/2007/07/04/sharing-and-synchronizing-data-across-multiple-computers/</guid>
		<description><![CDATA[I have several computers, one at the office (Windows Vista), one at home (Gentoo Linux), and one notebook (Windows XP). On most of them I want to share a common set of files, including letters and other documents, but also Miranda. This time I am going to tell you how I keep my shared data [...]]]></description>
			<content:encoded><![CDATA[<p>I have several computers, one at the office (<a href="http://en.wikipedia.org/wiki/Microsoft_Windows">Windows Vista</a>), one at home (<a href="http://www.gentoo.org">Gentoo Linux</a>), and one notebook (<a href="http://en.wikipedia.org/wiki/Microsoft_Windows">Windows XP</a>). On most of them I want to share a common set of files, including letters and other documents, but also Miranda. This time I am going to tell you how I keep my shared data in sync using <a href="http://www.cis.upenn.edu/~bcpierce/unison/">Unison</a>, <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a>, and <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">OpenSSH</a>, using a dedicated server as central hub.</p>
<p>(Note: this is a rather advisory level HOWTO, not a step-by-step, command-by-command tutorial. It might give you some ideas nevertheless.)</p>
<p><span id="more-64"></span></p>
<p>This version of my synchronization solution is based on a central dedicated server on which you can install Unison and login via SSH using public key authentication. You can also do the same with an external media, like an USB-Stick, but there you could use the external media directly without syncing. I would recommend using synching even in this case, as Flash-based media like most USB memory sticks only have limited write cycles. Additionally, if you use synching, you get some redundancy (I wouldn&#8217;t go as far as call it &#8220;backup&#8221;) in case one of your storage devices fails.</p>
<p><strong>Step 1 &#8211; Preparation</strong></p>
<p><a href="http://www.cis.upenn.edu/~bcpierce/unison/">Unison</a> is one of my favorite two-way synchronization tools. It works by keeping a database for every replica, so it can detect new, modified, and deleted files. The program was originally target at Linux, but there is a client for Windows as well, which works well. Its major advantage in my opinion is that it uses the <a href="http://en.wikipedia.org/wiki/Rsync">rsync</a>-protocol for transferring the data, which keeps the ordinary synchronization bandwidth reasonably small.</p>
<p>You have to install Unison on every client that is going to participate. <em>Important: you need to install the same version for every peer!</em></p>
<p><strong>Step 2 &#8211; The Central Hub<br />
</strong></p>
<p>Then you need the central server. I am using a Gentoo-based dedicates server at <a href="http://www.hetzner.de">Hetzner</a>. You don&#8217;t need a real server, but it must be an &#8220;always-on&#8221;, always reachable computer. It could be your gateway at home, but keep in mind you need to contact the host. Consider using <a href="http://de.wikipedia.org/wiki/DynDNS">DynDNS</a> or similar services if you don&#8217;t have a static IP for the box. The server can even be one of the target computers, but as mentioned, it needs to be reachable via the Internet for the other sync-partners.</p>
<p>I created a dm_crypt encrypted partition of 1GB size and mounted it at /home/martin/shared. The 1GB size is enough for me, in fact, the shared data is around 100MB. I am sharing data, not programs or (large) multimedia files.</p>
<p><strong>Step 3 &#8211; Configuring a Linux Peer<br />
</strong></p>
<p>Configuration of a Linux peer is the easier than configuration of a Windows peer, that&#8217;s why I am starting with this. First you need to create a SSH-key which will be used for authentication if you don&#8217;t already have one. Unison needs to be able to login via SSH without user interaction, still I do not recommend to create a key without passphrase. Protect the key with a passphrase, but use something like <a href="http://www.gentoo.org/proj/en/keychain/">keychain</a> to authenticate only once against the key before starting your synchronization.</p>
<p>You need to add the key to the ~/.ssh/authorized_keys2 file <em>at the central hub</em>. Ensure you can now login as the desired user using ssh <em>without a password prompt</em>.</p>
<p>Once SSH is working, you can create a profile for unsion, like my <em>shared.prf</em>:</p>
<blockquote><p><code>root = /home/martin<br />
root = ssh://martin@&lt;server&gt;//home/martin<br />
path = shared<br />
ignore = Path {shared/local}</code></p></blockquote>
<p>This profile synchronizes the ~/shared/ directory to the central hub&#8217;s ~/shared/ directory, ignoring anything at ~/shared/local, which gives you the easy possibility to exclude some of your files from synchronization.</p>
<p>That&#8217;s it, you can now synchronize the Linux host to the central hub. Do this anytime you quit working with the computer to prevent conflicts due to concurrent modifications on different workstations.</p>
<p><strong>Step 4 &#8211; Configuring a Windows Peer</strong></p>
<p>Windows configuration is a little bit different (but not much). First I create a <a href="http://www.truecrypt.org/">TrueCrypt</a> volume of the desired size. I like to have all shared folders at the same location, just out of habit. So I mount them all at S:\ and create a #shared subdirectory, which is going to contain the shared files. (Using TrueCrypt is entirely optional and not required, I just want to make it thieves a little bit harder to read my personal data.)</p>
<p>Then you need to have <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> (including plink and (advisable) pageant). Create a key and add it to the central hub&#8217;s ~/.ssh/authorized_keys2 files. I again advise against keys without password. Use pageant to cache the credentials for synchronization.</p>
<p>The Unison profile needs to be different for Windows, as you need to convince Unison to use PuTTY instead of ssh. Therefore a small batch-script is required, I call it <code>launcher_server.cmd</code> (containing just one line, remove the word wrap):</p>
<blockquote style="text-align: left"><p><code>@"C:\Program Files\PuTTY\plink.exe" -i "S:\putty-key.ppk" martin@my.server.domain unison -server</code></p></blockquote>
<p>Make sure the connection is able to login without further authentication.</p>
<p>The <code>shared.prf</code> needs to be a little bit different here:</p>
<blockquote><p><code>root = S:/#shared<br />
root = ssh://martin@&lt;server&gt;//home/martin<br />
sshcmd = S:/Program Files/Unison/launcher_server.cmd<br />
fastcheck = true<br />
path = shared<br />
ignore = Path {shared/local}</code></p></blockquote>
<p>(Note: the &#8220;fastcheck&#8221; attribute is optional, but I recommend using it on Windows, but see the <a href="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#fastcheck">Unison documentation</a> for further infos before using it!)</p>
<p><strong> Step 5 &#8211; Synchronize</strong></p>
<p>After you have set up all the hosts you want to participate, simply use it. Use keychain and pageant to ensure you don&#8217;t need a password for login at the central hub.  You should synchronize whenever you log off or shut down a workstation, to ensure there will be as little conflicts as possible. As long as you don&#8217;t create conflicts, even concurrent modifications can be handled automatically.</p>
<p>And now, have fun and enjoy working with a consistent dataset over multiple computers. <img src='http://www.dont-panic.cc/capi/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2007/07/04/sharing-and-synchronizing-data-across-multiple-computers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

