23

The context here is the Oneric development ISO. I don't want to have to re-download this every time something changes. I notice that there's a .zsync file in the download directory. From what I know, this should let me update only the chunks that have changed, saving a ton of bandwidth.

The only problem is, I don't have a clue what I'm doing :) Could somebody push me in the right direction to keep oneiric-desktop-amd64.iso up to date?

Oli
  • 293,335

2 Answers2

22

Turns out I was being dense. A correct Googling and I found my answer on the Ubuntu Wiki. All I need to run is:

zsync http://cdimage.ubuntu.com/daily-live/current/oneiric-desktop-amd64.iso.zsync

I should point out that my previously-downloaded ISO is in the same path as this.

It downloaded the zsync file, checked it against my ISO and updated it to the latest version, 162MB spent. Bargain.

Oli
  • 293,335
  • I just used this technique to zsync ubuntu-16.04-desktop-amd64.iso up to 16.04.1, and impressively, it found 52.6% of the contents in the original ISO, leaving me with slightly under half the file to download. – mwfearnley Aug 10 '16 at 20:09
  • @mwfearnley That's just creepy. I'd have expected more to have changed. – Oli Aug 10 '16 at 22:33
  • Isn't it similar to sudo apt update && sudo apt upgrade? – d a i s y Feb 05 '19 at 06:50
  • @daisy No, not really. – Oli Feb 05 '19 at 08:38
  • okay, so I have disco-desktop-amd64.iso in my Download folder, and now to update it, I just need to download iso.zsync file in download folder? or any other folder than Download? – d a i s y Feb 05 '19 at 08:59
  • Download the .zsync file to the same directory as the ISO and then run the zsync command as above. – Oli Feb 05 '19 at 17:05
4

Testing daily builds with bandwidth caps, I started trying to figure out how to go about this. Oli's posted technique led a response of "No relevent local data found - I will be downloading the whole file."

This is what I had to do to tell zsync to look for the right iso to build off of.

zsync -i /path/to/old/trusty-desktop-amd64.iso  http://cdimage.ubuntu.com/ubuntu-gnome/daily-live/current/trusty-desktop-amd64.iso.zsync

I hope this helps someone else.

  • 1
    zsync replaces your old ISO with the new one. (It does back up the old ISO... but when you run it again, the newer backup replaces the old.) So by default it assumes the old file is located where you're telling it to download. You can use the -i flag to specify the old file (you can even use it more than once and source from multiple files) or, assuming you want to replace the old file, you can simply make sure you're in the directory that contains it (cd /path/to/old/trusty-desktop-amd64.iso) or move it to the current directory where you wish to download. – Eliah Kagan Mar 27 '14 at 06:57