debmirror option

mamadou diop diopmodou8 at gmail.com
Tue Sep 7 12:44:32 CEST 2010


I am going to give you a debmirror script you can use and adapt to your
need. you must save it in a script shell
and place it in your path.

#!/bin/bash

dist=`basename $0|cut -f2 -d "_"`
DEST=/srv/mirrors
if [ ! -d ${DEST} ]; then
       mkdir -p ${DEST}
fi
if [ ! -d ${DEST}/${dist} ]; then
mkdir -p ${DEST}/${dist}
fi

case "$dist" in

"dapper"|"edgy"|"feisty"|"
gutsy"|"hardy"|"intrepid"|"jaunty"|"karmic"|"lucid" )
               dist_all="$dist,$dist-security,$dist-updates"
               arch="amd64,i386"
               host="archive.ubuntu.com"
               rootdir="--root=ubuntu"
               ;;
       "lpia"  )
               dist_all="hardy"
               arch="lpia"
               host="ports.ubuntu.com"
               rootdir="--root=/"
               ;;
       * )
               dist_all="$dist"
               arch="amd64,i386"
               host="archive.ubuntu.com"
               rootdir="--root=ubuntu"
               ;;
esac

debmirror --progress --verbose --nosource --host=$host --method=http
$rootdir --dist=$dist_all --section=main,restricted,universe,multiverse
--arch=$arch  $DEST/$dist




2010/9/7 <jurgen.lamsens at telenet.be>

> Correct me if I'm wrong, but if i do an 'apt-get install debmirror' on
> ubuntu 10.04 LTS for example, there is no debmirror configuration file by
> default,
> but if I just create one, I can specify stuff like that.
>
> Just copy the example from /usr/share/doc/debmirror/examples/debmirror.conf
> to /etc/debmirror.conf, and adjust as necessary, f.e.:
>
> $download_method="ftp";
> @dists="hardy,hardy-security,hardy-updates";    # jlamsens: default was
> "sid"
> @sections="main,main/debian-installer,restricted,restricted/debian-installer,universe,multiverse";
> # jlamsens: default was "main,main/debian-installer,contrib,non-free"
> @arches="i386,amd64";           # jlamsens: default was "i386"
>
> Kind regards,
> Jurgen Lamsens
>
>
> ----- Originele e-mail  -----
> Van: "Marcus Wellnitz" <wellnitz at datenwerk-it.de>
> Aan: linux-fai at uni-koeln.de
> Verzonden: Dinsdag 7 september 2010 09:08:41 GMT +01:00 Amsterdam / Berlijn
> / Bern / Rome / Stockholm / Wenen
> Onderwerp: Re: debmirror option
>
> Am Montag, 6. September 2010 22:52:07 schrieb mamadou diop:
> > Hello. Currently I am using a debmirror script to create my local mirror.
> > But, my problem is the size of the mirror must be about 27 Gb
> > (arch I386, distribution ubuntu hardy) and my free disk space is about 22
> > Gb. To correct this problem, i would not to use all the sections (main,
> > restricted, universe, multiverse) but i want to use only one or two
> > sections. What advises do you give me about this problem?
>
> Try to use apt-proxy.
>
> --
> Marcus Wellnitz
> Datenwerk GmbH
> Vogelsbergstr. 34
> 60316 Frankfurt am Main
>
> Telefon +49 (0) 69/9434086-0
> Fax     +49 (0) 69/9434086-9
> E-Mail  wellnitz at datenwerk-it.de
> Web     www.datenwerk-it.de
>
> Sitz: Frankfurt am Main, Amtsgericht  Frankfurt am Main HRB 55221
> Geschäftsführer: Michael Beck, Dr. Thomas Latz
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20100907/370750c9/attachment.htm 


More information about the linux-fai mailing list