debian mirror
Stephan Hermann
sh at sourcecode.de
Fri Jul 16 10:53:13 CEST 2010
Hi Again,
I'm sorry I forgot to tell you how it works:
put the script as "mirror_ubuntu_dist.sh" somehere in your $PATH
then create symlinks like that:
ln -s mirror_ubuntu_dist.sh mirror_lucid
ln -s mirror_ubuntu_dist.sh mirror_karmic
then start ./mirror_lucid to debmirror ubuntu lucid
or ./mirror_karmic to debmirror karmic
it creates separate debmirrors for the different releases, and not one
archive for all releases.
So you can decide which release you want, and you could put that mirror
on an LVM device, which you can destroy, snapshot or whatever you want
with it.
Regards,
\sh
On Fri, 2010-07-16 at 10:50 +0200, Stephan Hermann wrote:
> On Thu, 2010-07-15 at 17:26 +0000, mamadou diop wrote:
> > How are you? who can give me the mkdebmirror script for Ubuntu jaunty?
> >
>
> I don't know what mkdebmirror script is but my personal script for
> debmirroring ubuntu distros is this:
>
> #!/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
>
>
> the mirrors are located under /srv/mirrors/<ubuntu-release-name like
> lucid>
>
> Regards,
>
> \sh
>
More information about the linux-fai
mailing list