|Free Software at Schools: Installing and Maintaining a Skolelinux/Debian-edu Network; Based on Debian Sarge, prerelease pr05|
There are constantly new versions available of the Skolelinux/Debian-edu CD. An entire CD is about 650MB, which with a normal ADSL line takes 2-3 hours to download, even longer time with ISDN. If you want to keep up with the latest version of the Skolelinux/Debian-edu CD, you either have to download it yourself or get someone else to download it and burn it for you.
If you choose to download it yourself, there is a program that makes it possible to use as a starting point an existing CD that you have already downloaded and only download the files that are different in the newer version. In this way, you can download a new version (for example pr05) in a short time if you have the previous version(for example pr04), even using ISDN.
The command that makes this possible is
rsync --no-whole-file --progress -vv --stats developer.skolelinux.no::skolelinux-cd/debian-edu_sarge-i386-pr05.iso /skole/tjener/home0/iso/debian-edu_sarge-i386-pr05.iso.
What happens here is that the local file /skole/tjener/home0/iso/debian-edu_sarge-i386-pr05.iso gets "updated" so that it becomes identical with the file debian-edu_sarge-i386-pr05.iso that is stored on the Skolelinux ftp-server.
But before you do this, you have to have a local copy on your computer that you want to update. In this example, the name of the copy is debian-edu_sarge-i386-pr05.iso and it is stored in the directory /skole/tjener/home0/iso/. If your local copy is called something else and is placed in another directory, you will need to remember to take that into account when you run the rsync command.
You may be wondering why I upgrade a local file debian-edu_sarge-i386-pr05.iso with a file by the same name from Skolelinux. That's because my local file debian-edu_sarge-i386-pr05.iso is really a debian-edu_sarge-i386-pr04.iso, but with a different name.
Recipe for Upgrading with rsync
First you have to install the package rsync, apt-get install rsync
Say you have a CD with debian-edu_sarge-i386-pr04.iso, which you want to upgrade to a newer version, for example pr44.
The first thing you have to do is to copy the contents of that CD over to your hard drive. You put the CD into the CD-ROM and then mount /cdrom
You can check if the CD is mounted with the command df -h. Look at the line
/dev/cdrom 692M 692M 0 100% /cdrom
After that you copy the old version from the CD over to you hard drive with the command
dd if=/dev/cdrom of=/skole/tjener/home0/iso/debian-edu_sarge-i386-pr05.iso. Replace the pr05 with the number of the new version that you want to download.
Now all you have to do is execute the rsync command.
If everything works the way it's supposed to do, you will see the following on the screen:
klaus@tjener:/skole/tjener/home0/iso$ rsync --no-whole-file \--progress -vv --stats \developer.skolelinux.no::skolelinux-cd/debian-edu_sarge-i386-pr05.iso \/skole/tjener/home0/iso/skolelinux-i386-pr44.iso opening tcp connection to developer.skolelinux.no port 873 /skole/tjener/home0/iso/woody-i386-1.raw 679182336 100% 1.96MB/s 0:05:30 rsync (receiver) heap statistics: arena: 115288 (bytes from sbrk) ordblks: 2 (chunks not in use) smblks: 0 hblks: 0 (chunks from mmap) hblkhd: 0 (bytes from mmap) usmblks: 0 fsmblks: 0 uordblks: 101336 (bytes used) fordblks: 13952 (bytes free) keepcost: 13904 (bytes in releasable chunk) Number of files: 1 Number of files transferred: 1 Total file size: 679182336 bytes Total transferred file size: 679182336 bytes Literal data: 21512192 bytes Matched data: 657670144 bytes File list size: 35 Total bytes written: 248397 Total bytes read: 16827778 wrote 248397 bytes read 16827778 bytes 42007.81 bytes/sec total size is 679182336 speedup is 39.77
Make certain that you have at least 650MB free space when you download using rsync, because rsync creates a temporary file while it is downloading. This file grows and becomes equally large as the CD. When it's finished downloading, the temporary file gets deleted.