Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 44 lines (37 sloc) 1.703 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#!/bin/sh
# $Id: mkdebmirror 4018 2006-09-25 12:13:17Z lange $
# Thomas Lange, lange@informatik.uni-koeln.de, (c) 2001-2005
# create partitial debian mirror using command debmirror(1) and rsync

# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rsync_disks() {
    # get the boot disks
    rsync --delete -av $2::debian/dists/$1/main/disks-$arch $destdir/debian/dists/$1/main/
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
update_from() {
    # update local mirror from a host
    host=$1
    defopt="$allopt --host=$host --dist=$dist"
    echo "------------------ create mirror for debian ------------------"
    debmirror --getcontents $destdir/debian $defopt
}

# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# main program
# here you have to adjust the hostnames of the mirror and the names of the distributions
debug="$@"
arch=i386
dist=etch
# dist=etch,etch-proposed-updates
destdir=/var/www/debian_mirror
allopt="$debug --ignore-missing-release --ignore-release-gpg --passive --nosource --arch=$arch --ignore=disks-$arch/"

# first sync from a mirror near to you!
# please ask the mirror admin(s) for permission before downloading
# several GB of data!
update_from ftp.de.debian.org

# since this mirror is not always up to date, sync the rest from an official mirror
# update_from ftp.de.debian.org

# even one should not mirror the security site, but I will do it.
echo "------------------ create mirror for debian-security ------------------"
debmirror $destdir/debian-security $allopt --host=security.debian.org -r debian-security --section main,contrib,non-free -d etch/updates

# get installation disk images via rsync
#rsync_disks etch ftp2.de.debian.org
Something went wrong with that request. Please try again.