Becoming a mirror for Debian CD images
To become a Debian CD Image mirror site, you need a Linux or Unix-like machine with a permanent, reliable connection to the Internet. Debian CD mirrors hold .iso images for CDs and DVDs of various sizes, files for jigdo (.jigdo and .template), BitTorrent files (.torrent) and verification files for the images (SHA256SUMS*, SHA512SUMS* and other).
- Master site
- Mirroring using HTTP/FTP is discouraged
- Mirroring using rsync is acceptable
- Mirroring using jigdo-lite is discouraged
- Mirroring using jigdo-mirror is recommended
- How to become a push mirror
- Excluding files from mirroring
- Naming conventions and size requirements for .iso images
- Registering the mirror
The URLs of the master site are shown below - however, please consider mirroring from another nearby mirror (mirror lists: HTTP/FTP, rsync) if possible. Access to the master site may be restricted around release time.
Also be aware that a huge amount of data is stored in these directories - read the section below for details on how to cut down the size by excluding certain files.
- Stable images (updated for each stable release):
- Weekly images:
- Daily images:
You should not use FTP or HTTP to update your mirror. These transfer methods have a high failure probability because of the enormous size of the files.
Furthermore, HTTP and FTP do not include integrity checks of the downloaded data, it is more likely that aborted downloads or data corruption will go unnoticed.
The rsync program is a good solution for mirroring. It is less efficient than the other, Debian-specific mirroring solution below, but may be easier to set up. Furthermore, it ensures that all files are transferred correctly and that the metadata (e.g. timestamps) is kept in sync just like the file data.
Use at least the options --times --links --hard-links --partial --block-size=8192. This will preserve modification time, symlinks and hardlinks, and use a block size of 8192 bytes (most efficient for CD images). When modification time and size are the same, rsync will just leave the file alone, so --times is really obligatory.
Recent versions of the jigdo-lite program support batch downloading of multiple images. However, we do not recommend to use jigdo-lite to create Debian CD mirrors - use jigdo-mirror instead.
Actually, this means: Mirror the .iso files using jigdo-mirror, then (if you also want to mirror other types of files, e.g. .jigdo and .template files) run rsync over the directory to fetch the rest. The scripts on this page might help when setting this up.
A lot of people maintain "regular" Debian mirrors (debian/), or just have such a mirror nearby. This means that they already have the .debs that are included in the CD images. The obvious question is -- why can't we use those same files in the CD images?
jigdo-mirror is a program that enables one to generate a Debian CD images using the files from a "normal" mirror, plus a few extra jigdo template files.
First off, you need the jigdo template files. See the jigdo information page for links. Fetch the files for each architecture you wish to build images for.
Create ~/.jigdo-mirror file to configure the program. This is an example:
jigdoDir="/where/you/keep/mirrors/debian-cd/current/jigdo" imageDir="/where/you/keep/mirrors/debian-cd/current/images" tmpDir="/where/you/keep/mirrors/debian-cd/current/images" debianMirror="file:/where/you/keep/mirrors/debian" include='i386/|sparc/|powerpc/|source/'; exclude='-1\.'
The include and exclude variables contain the list of architectures you wish to create images for (regular expressions, rather). For more information, see the jigdo-mirror manual page or the source itself (it's a shell script with a lot of comments).
After you've configured it, simply run jigdo-mirror and it will do everything on its own. It will make a lot of output and probably take a while, so we suggest that you make steps to handle that (run it in screen, redirect the output into a file etc).
Whenever new images are available, the master site can send a message to its mirrors and make them start updating immediately. This way, the new data is "pushed" out rather than "pulled" by the mirrors during their next daily update, which leads to faster propagation of new image releases.
If you want your mirror to be part of this update system, have a look at this page.
To reduce the amount of storage required by your Debian CD mirror, you can exclude certain files from being mirrored. The following instructions include command line switches for rsync, but might help you even if you use a different tool for mirroring. With rsync, --include and --exclude switches are considered in order of appearance, and the first switch whose file pattern matches determines whether the file is excluded or included.
- Exclude source code:
This will prevent images containing source code from being mirrored. Note that some people consider it inappropriate to offer binaries of GPL-licensed programs on a server without also offering the programs' source code on the same server.
- Exclude full images:
Exclude all full CD/DVD image sets for all architectures, but mirror the net-install .iso images. We recommend always to mirror these small images: Relative to their size, they are extremely useful!
- Exclude full images for non-i386 architectures:
As above, but do include all CD/DVD images for the i386 architecture.
- Exclude full images, except for i386 CDs 1 to
The full set of i386 images may still take too much space for you if it includes DVD and dual-layer DVD images. This excludes all .iso images except for the net-install images and the first three i386 CDs.
- Exclude all architectures except i386:
--exclude=alpha/ --exclude=arm/ --exclude=hppa/ --exclude=hurd/
--exclude=ia64/ --exclude=m68k/ --exclude=mips/ --exclude=mipsel/
--exclude=powerpc/ --exclude=s390/ --exclude=sh/
Only include the full set of files for i386, do not include any .jigdo, .iso etc files whatsoever for the other architectures.
The different variants of .iso images are distinguishable by their names, allowing you to restrict the types of images you mirror:
- *-netinst.iso: One image for each architecture, up to 300 MB
- *-dvd.iso (single-layer DVDs): Multiple images for i386 only, each up to 4482 MB large. For sarge, the accumulated size of the i386 images is about 9000 MB.
- *-dldvd.iso (dual-layer DVDs): As above, except that individual images are up to 8106 MB large. For sarge, no .iso images are available, only jigdo files.
- *.iso: All remaining .iso files which do not match one of the above patterns are CD images. There are multiple images for each architecture, each up to 650 MB large. The accumulated size of all images and architectures equals the size of a full Debian mirror (100 GB as of this writing).
To make your CD image mirror useful to a wider audience, you can register it in our mirror list such as this one or this one. However, since full images are large files, this might cause you many gigabytes of network traffic per day.
We appreciate all new CD image mirrors. Thanks in advance!