Ubuntu Xenial Xerus 16.04 Linux ISO image download with zsync

zsync is a very handy download tool if you would like to keep your Ubuntu Xenial Xerus ISO image up to date without the need to re-download and entire ISO image every time there was an update. This is especially true with a daily build Ubuntu Xenial Xerus ISO images or if you have a limited download speed or bandwidth. In this case thezsync will allow you to download only that part of the ISO image which has been changed since your last download.

Prerequisites

To get begin let’s start by installation of zsync package:

# apt-get install zsync

Initial ISO image download

Once zsync is installed you are ready to download the actual ISO image. First, locate a relevant .zsync file whether it is daily build, desktop, server etc. Browse the following Ubuntu Download site to locate your desired ISO download link. eg:

DAILY BUILD Xenial Xerus 16.04 Linux ISO image
http://cdimage.ubuntu.com/daily-live/current/xenial-desktop-amd64.iso.zsync
RELEASE Xenial Xerus 16.04 Linux ISO image:
http://cdimage.ubuntu.com/releases/16.04/release/ubuntu-16.04-desktop-amd64+mac.iso.zsync

The first time you run zsync command in order to download Ubuntu Xenial ISO image you will obviously have other choice either than to download the entire image. Enter zsync command followed by *.zsync ISO image download link:

# zsync http://cdimage.ubuntu.com/daily-live/current/xenial-desktop-amd64.iso.zsync
#################### 100.0% 199.9 kBps DONE     

No relevant local data found - I will be downloading the whole file. If that's not what you want, CTRL-C out. You should specify the local file is the old version of the file to download with -i (you might have to decompress it with gzip -d first). Or perhaps you just have no data that helps download the file
downloading from http://cdimage.ubuntu.com/daily-live/current/xenial-desktop-amd64.iso:

Partial ISO image download

The above command will download Ubuntu Xenial Xerus 16.04 daily build ISO image. To update the image with a new release or daily build image simply re-run the below command and zsync will automatically compare your previous ISO image with the new image available:

# zsync http://cdimage.ubuntu.com/daily-live/current/xenial-desktop-amd64.iso.zsync
#################### 100.0% 248.7 kBps DONE     

reading seed file xenial-desktop-amd64.iso: 
************************
Read xenial-desktop-amd64.iso. Target 88.6% complete. 
downloading from http://cdimage.ubuntu.com/daily-live/current/xenial-desktop-amd64.iso:
#################### 100.0% 207.3 kBps DONE      

verifying download...checksum matches OK
used 1307213824 local, fetched 168680739

Automating Ubuntu Image download

In case you would like to keep your Ubuntu Xenial image up to date without your interference modify you cron scheduler list to download the ISO image automatically every night:

$ crontab -e

and enter the following line while updating the actual download URL, time and download destination directory to reflect your needs:

 0 0 * * * cd /ISO/download/xenial/; /usr/bin/zsync http://cdimage.ubuntu.com/daily-live/current/xenial-desktop-amd64.iso.zsync