HOW TO HANDLE ISO RDIFFS on DEVELOPER ---------------------------------------- Author: Finn-Arne Johansen faj@bzz.no This Document is released under the GNU General Public License, version 2. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. $Id: handling_iso_rdiffs.txt,v 1.2 2005/07/22 15:05:24 pere Exp $ This HOWTO is based on the work in the test lab of BzzWare AS http://bzz.no. Background for Document ----------------------- Developer.skolelinux.no is our developement machine. It's used for various purposes, cvs repository, CD building, Some web applications and for storing our CD-Images. but space is limitted, and diskspace for a reliable server is costly. It's about backup, backup procedures, reliablilty etc. But at least we like to be able to regenerate the old Images we've released, so we need to com up with a nice algorithm.Storing them as full size, or even gzipped images takes a log of space. That's why we use the same method as with slbackup, storing the rdiff between each image. In addition, we keep some images fully, to make it faster to regenerate the older images. How to create an rdiff ---------------------- First you need to decide which image to keep, and which image to only keep as an rdiff. Lets say you have 3 images: skolelinux-i386-rc1.iso skolelinux-i386-rc2.iso skolelinux-i386-rc3.iso We want to keep rc3, and only stor the rdiff's for rc1 and rc2. First we need to create the rdiff from rc2 to rc1. To create an rdiff, we first need to create a signature: rdiff signature skolelinux-i386-rc2.iso skolelinux-i386-rc2.sign then we create the actual rdiff as a delta rdiff delta skolelinux-i386-rc2.sign skolelinux-i386-rc1.iso skolelinux-i386-rc1.rdiff To make it easier to get the correct date of the image, set the rdiff to hold the same date as the iso: touch -r skolelinux-i386-rc1.iso skolelinux-i386-rc1.rdiff Then remove the iso for rc1, and the signature for rc2 rm skolelinux-i386-rc1.iso skolelinux-i386-rc2.sign okay, some space was saved, but lets save mor, by creating an rdiff from rc3 to rc2 as well: rdiff signature skolelinux-i386-rc3.iso skolelinux-i386-rc3.sign rdiff delta skolelinux-i386-rc3.sign skolelinux-i386-rc2.iso skolelinux-i386-rc2.rdiff touch -r skolelinux-i386-rc2.iso skolelinux-i386-rc2.rdiff rm skolelinux-i386-rc2.iso skolelinux-i386-rc3.sign This should leav us with 3 files: skolelinux-i386-rc1.rdiff skolelinux-i386-rc2.rdiff skolelinux-i386-rc3.iso How to Rebuild an iso image, using rdiffs ----------------------------------------- Rebuilding the iso's is somewhat easier, but remember to use the rdiff-patches the correct way. We have the 2 given rdiff's and the one iso: skolelinux-i386-rc1.rdiff skolelinux-i386-rc2.rdiff skolelinux-i386-rc3.iso We want to have an rc1.iso. First you must create an rc2.iso: rdiff patch skolelinux-i386-rc3.iso skolelinux-i386-rc2.rdiff skolelinux-i386-rc2.iso then you must create the rc1.iso: rdiff patch skolelinux-i386-rc2.iso skolelinux-i386-rc1.rdiff skolelinux-i386-rc1.iso Then set the correct date for the rc1.iso: touch -r skolelinux-i386-rc1.rdiff skolelinux-i386-rc1.iso and remove the intermediate rc2.iso rm skolelinux-i386-rc2.iso Todo ---- It would have been nice to have a web-page that could generate the old iso's for us whenever we want to regenerate them. It would also be nice if we could add more patch at once, to remove the need for intermediate images. That's al folks