Re: mirror debian ?
olivier wrote:
>
> j'aimerai avoir une "copie" qui s'update automatiquement de
> debian-stable-i386-binary pour le reseau local
> quels sont les outils pour ca ?
rsync(1)
cf script attaché à lancer par cron .
#! /bin/sh
set -e
# Set the variables below to fit your site. You can then use cron to have this
# script run daily to automatically update your copy of the archive
#
# TO is the destination for the base of the debian directory (the dir that
# holds dists/ and ls-lR)
#
# RSYNC_HOST is the site you have chosen from the mirrors file
#
# RSYNC_DIR is the directory given in the Archive-rsync: line of the
# mirrors file for the site you have chosen to mirror.
#
# chmod 744 anonftpsync
#
# You MUST have rsync 2.0.16-1 or newer which is available in slink
# With a blank EXCLUDE you will mirror the entire archive.
# This exclude list is what ftp1.us.debian.org uses
EXCLUDE="--exclude slink* \
--exclude woody* \
--exclude sid \
--exclude Debian2.1r5 \
--exclude source \
--exclude *-alpha* \
--exclude *-alpha.deb \
--exclude *-m68k* \
--exclude *-m68k.deb \
--exclude *-sparc* \
--exclude *-sparc.deb \
--exclude *-mipsel* \
--exclude *-mipsel.deb \
--exclude *-mips* \
--exclude *-mips.deb \
--exclude *-arm* \
--exclude *-arm.deb \
--exclude *-powerpc* \
--exclude *-powerpc.deb \
--exclude *-hurd-i386* \
--exclude *-hurd-i386.deb \
--stats \
"
TO=/home/ftp/debian
RSYNC_HOST=sunsite.tut.fi
RSYNC_DIR=debian/
LOCK="${TO}/Archive-Update-in-Progress-`hostname -f`"
# Get in the right directory and set the umask to be group writable
#
cd $HOME
umask 002
# Check to see if another sync is in progress
if lockfile -! -l 43200 -r 0 "$LOCK"; then
echo `hostname` is unable to start rsync, lock file exists
exit 1
fi
trap "rm -f $LOCK > /dev/null 2>&1" exit
set +e
rsync -rltvz --delete \
--exclude "Archive-Update-in-Progress-`hostname -f`" \
--exclude "project/trace/`hostname -f`" \
$EXCLUDE \
rsync://$RSYNC_HOST/$RSYNC_DIR $TO > /dev/null 2>&1
date -u > "${TO}/project/trace/`hostname -f`"
TO=/home/ftp/debian-non-US
RSYNC_DIR=debian-non-US/
rsync -rltvz --delete \
--exclude "Archive-Update-in-Progress-`hostname -f`" \
--exclude "project/trace/`hostname -f`" \
$EXCLUDE \
rsync://$RSYNC_HOST/$RSYNC_DIR $TO > /dev/null 2>&1
date -u > "${TO}/project/trace/`hostname -f`"
TO=/home/ftp/debian-security
RSYNC_HOST=security.debian.org
RSYNC_DIR=debian-security/
rsync -rltvz --delete \
--exclude "Archive-Update-in-Progress-`hostname -f`" \
--exclude "project/trace/`hostname -f`" \
$EXCLUDE \
rsync://$RSYNC_HOST/$RSYNC_DIR $TO > /dev/null 2>&1
Reply to: