<?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>Digitivity &#187; rsync</title>
	<atom:link href="http://digitivity.org/tag/rsync/feed" rel="self" type="application/rss+xml" />
	<link>http://digitivity.org</link>
	<description>The Digital Productivity Blog</description>
	<lastBuildDate>Sat, 24 Dec 2011 17:34:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Updating Ubuntu Boot CD Images with zsync</title>
		<link>http://digitivity.org/938/updating-ubuntu-boot-cd-iso-images-with-zsync-incremental-download</link>
		<comments>http://digitivity.org/938/updating-ubuntu-boot-cd-iso-images-with-zsync-incremental-download#comments</comments>
		<pubDate>Sun, 21 Mar 2010 16:59:52 +0000</pubDate>
		<dc:creator>Digitivity</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[boot CD]]></category>
		<category><![CDATA[file synchronization]]></category>
		<category><![CDATA[image file]]></category>
		<category><![CDATA[ISO]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[zsync]]></category>

		<guid isPermaLink="false">http://digitivity.org/?p=938</guid>
		<description><![CDATA[<p>Posted in <a href="http://digitivity.org/category/linuxunix" title="Linux/Unix">Linux/Unix</a></p>As I mentioned in a article on Ubuntu Boot CD images, there's a new boot CD image every day because the new version is being tested out. When the new version is finally released, work starts on version next, and daily builds start to come out again.

The problem is downloading a new 700MB file daily seems wasteful, and that's 21GB of download per month, which your ISP may or may not like.

The solution is zsync, a binary file sychronization program. Read on to find out how it works.



Related posts:<ol><li><a href='http://digitivity.org/925/how-to-create-an-ubuntu-live-boot-cd' rel='bookmark' title='Permanent Link: How to Create an Ubuntu Boot CD for Lucid Lynx'>How to Create an Ubuntu Boot CD for Lucid Lynx</a></li>
<li><a href='http://digitivity.org/884/how-to-install-google-chromium-on-ubuntu' rel='bookmark' title='Permanent Link: How to Install Google Chromium on Ubuntu'>How to Install Google Chromium on Ubuntu</a></li>
<li><a href='http://digitivity.org/806/latest-windows-xp-update-crashes-computers-blue-screen' rel='bookmark' title='Permanent Link: Latest Windows XP Update Crashes Computers'>Latest Windows XP Update Crashes Computers</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in a article on <a href="http://digitivity.org/925/how-to-create-an-ubuntu-live-boot-cd">Ubuntu Boot CD images</a>, there&#8217;s a <strong>new boot CD image</strong> every day because the new version is being tested out. When the new version is finally released, work starts on version next, and daily builds start to come out again.</p>
<p>The problem is <strong>downloading</strong> a new <strong>700MB</strong> file daily seems <strong>wasteful</strong>, and that&#8217;s 21GB of download per month, which your ISP may or may not like.</p>
<p>The solution is <strong><a href="http://zsync.moria.org.uk/">zsync</a></strong>, a binary <strong>file sychronization</strong> program.</p>
<h2>Introduction to zsync</h2>
<p>zsync uses the same algorithm as another file-syncing program, <strong>rsync</strong>.  But zsync is better than rsync for <strong>file distribution</strong> where one file is going to multiple clients outside of a single organization. Also:</p>
<ul>
<li>zsync doesn&#8217;t require a program to run on the <strong>server</strong>. It runs on the <strong>client</strong>.</li>
<li>zsync handles <strong>compressed files</strong> well.</li>
</ul>
<p>You might wonder how zsync could possibly work with binary files, since a single small change can render the whole file totally different, and thus not practicably syncable. The answer is the zsync has special handling for <strong>gzipped</strong> files (files compressed with the gzip program).</p>
<h2>Installing zsync</h2>
<p>First, if you haven&#8217;t already, add the universe repository to your list of <a href="https://help.ubuntu.com/community/Repositories/Ubuntu">software repositories</a>. You can do this in System &gt; Administration &gt; Software Sources.</p>
<p>Then install zysync either by <a href="apt://zysnc">clicking here</a> from Firefox or entering the following from the terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> zysnc</pre></div></div>

<h2>Using zsync</h2>
<p>It only makes sense to use zysnc if you already have a full <strong>ISO image file</strong> that you want to update. So, first <a href="http://digitivity.org/925/how-to-create-an-ubuntu-live-boot-cd">download an Ubuntu ISO image file</a>.</p>
<p>Then, when there&#8217;s an update you want to get, go to the directory where the full image file is in a terminal. Then type zsync followed by the HTTP address of where the <strong>.zsync file</strong> is. (The .zsync file helps zsynch to correctly identify and apply updates.)</p>
<p>For the most often used Ubuntu CD image (the <strong>32-bit desktop image</strong>), that would be:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">zsync http:<span style="color: #000000; font-weight: bold;">//</span>cdimage.ubuntu.com<span style="color: #000000; font-weight: bold;">/</span>daily-live<span style="color: #000000; font-weight: bold;">/</span>current<span style="color: #000000; font-weight: bold;">/</span>lucid-desktop-i386.iso.zsync</pre></div></div>

<p>You can find other .zsync files in the same place where the CD images are at <a href="http://cdimage.ubuntu.com/daily/current/">Ubuntu downloads</a>.</p>
<p>Note: At the end of this procedure, the <strong>updated file</strong> will have the same name as the old file. The <strong>old file</strong> is kept and saved with a &#8220;<strong>.zs-old</strong>&#8221; filename suffix.</p>
<h2>zsync at work</h2>
<p>zysnc first downloads the .zsync file.</p>
<p>Then it starts downloading the actual image file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">downloading from http:<span style="color: #000000; font-weight: bold;">//</span>cdimage.ubuntu.com<span style="color: #000000; font-weight: bold;">/</span>daily-live<span style="color: #000000; font-weight: bold;">/</span>current<span style="color: #000000; font-weight: bold;">/</span>lucid-desktop-i386.iso:
<span style="color: #666666; font-style: italic;">###################- 96.3% 43.8 kBps</span></pre></div></div>

<p>The image file is saved with a <strong>.part suffix</strong> during the download. If the download is <strong>interrupted</strong>, just run zsync again. It&#8217;ll pick up where it left off:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Read lucid-desktop-i386.iso.part. Target <span style="color: #000000;">92.4</span><span style="color: #000000; font-weight: bold;">%</span> complete.
downloading from http:<span style="color: #000000; font-weight: bold;">//</span>cdimage.ubuntu.com<span style="color: #000000; font-weight: bold;">/</span>daily-live<span style="color: #000000; font-weight: bold;">/</span>current<span style="color: #000000; font-weight: bold;">/</span>lucid-desktop-i386.iso:
<span style="color: #666666; font-style: italic;">##################-- 94.8% 43.8 kBps         A</span></pre></div></div>

<p>Once it&#8217;s done, it <strong>verifies</strong> the file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">verifying download...checksum matches OK
used <span style="color: #000000;">663175168</span> <span style="color: #7a0874; font-weight: bold;">local</span>, fetched <span style="color: #000000;">55365870</span></pre></div></div>

<h3>Saving the .zsync file</h3>
<p>The .zsync file is about 1.4MB. You can avoid downloading it again by using the <strong>-k</strong> <strong>option</strong> followed by the .zsync file.</p>
<p>If the local file has a different than that referenced in the .zsync file, specify the local filename with the <strong>-i option</strong>.</p>


<p>Related posts:<ol><li><a href='http://digitivity.org/925/how-to-create-an-ubuntu-live-boot-cd' rel='bookmark' title='Permanent Link: How to Create an Ubuntu Boot CD for Lucid Lynx'>How to Create an Ubuntu Boot CD for Lucid Lynx</a></li>
<li><a href='http://digitivity.org/884/how-to-install-google-chromium-on-ubuntu' rel='bookmark' title='Permanent Link: How to Install Google Chromium on Ubuntu'>How to Install Google Chromium on Ubuntu</a></li>
<li><a href='http://digitivity.org/806/latest-windows-xp-update-crashes-computers-blue-screen' rel='bookmark' title='Permanent Link: Latest Windows XP Update Crashes Computers'>Latest Windows XP Update Crashes Computers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://digitivity.org/938/updating-ubuntu-boot-cd-iso-images-with-zsync-incremental-download/feed</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: digitivity.org @ 2012-02-08 07:41:11 -->
