Home Downloads Zsync – File transfer utility to download only new parts of a file

Zsync – File transfer utility to download only new parts of a file

by Pulkit Chandak
Published: Updated:
ZSYNC file transfer utility

Technology has sure been progressing at a faster pace, and the internet is cheaper than ever. However, there is no fun in wasting the bandwidth and your valuable time on downloading the same file over and over again. Unfortunately, the updated versions of a file with minor changes still force us to do exactly that.

Zsync File Transfer Utility

To get over this situation, we recommend Zsync. It is a file transfer utility that allows you to download only new parts of a file, given that the file provider has a .zsync file on the server. Thankfully, several distribution maintainers are starting to use this format, making it a much easier way to keep your ISO images to the latest version without downloading them every time they have been updated with minor updates.

How it works

Zsync works on a simple CLI command, and what it basically does is compare the file that you maintain, to the URL that you provided. If there are any additional parts of the file, Zsync will download those parts for you. If not, it will download the whole file.

It uses the URL as a central server to which the computers of the downloaders are compared. Any difference will be updated. It works like a massive network of shared directories.

Zsync installation on Ubuntu, Linux Mint, Arch Linux, Fedora

Zsync is available in most distributions’ official repositories, so you can just install Zsync from the command line.

For Ubuntu/Linux Mint (or any derivatives):

sudo apt-get install zsync

For Arch and derivatives:

sudo pacman -S zsync

For Fedora, you have to enable the repository first:

sudo dnf copr enable ngompa/zsync

and install:

sudo dnf install zsync

If none of these work, you can download and install the source code. For that, enter these sequence of commands. You can obtain the latest download link from the Zync website.

wget http://zsync.moria.org.uk/download/zsync-0.6.2.tar.bz2
tar xjf zsync*
cd zsync-0.6.2/
./configure
make
sudo make install

And that’s all you need to do for the installation.

Sample output on Linux Mint

Zsync installation.

Zsync installation in Linux MInt.

Usage

New parts of an existing file

The usage is fairly simple. The things that you need are :

  • The URL of the zsync file to be downloaded.
  • An older version of the same file (if you have it).

In this example, I will be downloading Ubuntu. I already have the ISO file of Ubuntu 18.04-2, and I will update it with the daily build. This is the URL to find Ubuntu’s daily builds.

Ubuntu Daily Build

Ubuntu’s .zsync file is present in the downloads.

The filename of the already existing file has to be added with the -i attribute. So the syntax for that is:

zsync -i ubuntu-18.04.2-desktop-amd64.iso http://cdimage.ubuntu.com/ubuntu/daily-live/20190222/disco-desktop-amd64.iso.zsync
Zsync updating.

Zsync downloading new parts of the same ISO.

Here, it’s visible that after comparing the files, it is downloading the rest of the file from the given URL!

If the file doesn’t exist…

If the older version is not present, and you only put in the URL of the .zsync file, it will additionally download the whole original file. So in this case, it will download the original ISO file of Ubuntu too.

Ubuntu download

Zsync downloads the whole file in case its older version is not present.

Conclusion

Zsync is an excellent file transfer utility that can save a lot of your time and bandwidth. Even though not supported by a lot of distributions, it’s still spreading quite fast. So next time before downloading a distribution’s new version, make sure to check if it has a .zsync download.

That’s all for today. Cheers!

You may also like

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.