Debian spiegeln

Schau Dir mal debmirror an ... das ist etwas handlicher, als nen kompletten Debian-Mirror zu spiegeln ...
 
Meinst du das Debmirror die Lösung ist? Debmirror ist genauso kompliziert oder unkompliziert wie pures Rsync . Bei Debmirror darf man sich noch mit den unterschiedlichen Methoden auseinandersetzen. Wie ftp http hftp rsync
 
Falsch ... bei debmirror _hat_ man unterschiedliche Möglichkeiten! Das heißt noch lange nicht, dass man sich damit rumschlagen muss ...
Und nein, debmirror ist nicht _die_ Lösung, sondern _eine_ Lösung ... insbesondere dann, wenn nicht nur rsync-Server im Spiel sind ...

Weitere Alternativen gibts da: http://www.debiananwenderhandbuch.de/debianmirror.html
 
Zuletzt bearbeitet:
Hmm, da hab ich ja was losgetreten.
Mir geht es als erstes um die richtigen Einstellungen. Ich will nur die etch-Dateien der i386 haben.
Als Adresse habe ich:
RSYNC_HOST=http://www.debian.org/mirror/etch
Irgendwie scheint das nicht zu funktionieren. Als Auschluß habe ich:
ARCH_EXCLUDE="alpha arm hppa hurd-i386 ia64 m68k mipsel mips powerpc s390 sparc"
eingegeben. Irgendwas habe ich da wohl falsch gemacht.
Als Antwort kriege ich:
ERROR: Help, something weird happened
mirroring /pool exited with exitcode 12
Rotated `/var/log/spiegel/debian-mirror.log' at Mo 29. Jan 19:43:57 CET 2007.
Irgendwas klappt mit den mirrors nicht... . Aber was?
 
Das sollte wohl eher
Code:
RSYNC_HOST=ftp.de.debian.org
oder ähnliches sein ...
Und dann dürfte noch sowas fehlen:
Code:
EXCLUDE="\
  --exclude stable/  --exclude unstable/ \
  --exclude source/ \
  --exclude *.orig.tar.gz --exclude *.diff.gz --exclude *.dsc"
Es sei denn, Du willst das alles haben ...
 
klappt auch nicht.
Fehlermeldung in der log:

building file list ... rsync: link_stat "/root/#" failed: No such file or directory (2)
rsync: link_stat "/root/#" failed: No such file or directory (2)
rsync: link_stat "/root/ftp.de.debian.org::debian//pool/." failed: No such file or directory (2)
done

sent 21 bytes received 20 bytes 82.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
ERROR: Help, something weird happened
mirroring /pool exited with exitcode 23

Da kann ich nix mit anfangen...
 
Wieso "/root/"??
Poste mal das komplette Script ...
 
Da isses:
Code:
#! /bin/sh
set -e

# This script originates from [url]http://www.debian.org/mirror/anonftpsync[/url]
#
# modified by Simon Paillard <simon.paillard@resel.enst-bretagne.fr>, 2006-11-18
# + --delete-after and --delay-updates to minimize the length of lack of consistency
# + 'date -u' not te be localized
# + some more documentation about variables
#
# modified by Martin Zobel-Helas <zobel@debian.org>, 2005-01-16
# 	these modifications are published under the terms of the GNU GPL
# Modifications:
# + some more documentation about variables
# + added ARCH_EXCLUDE
# + mirror in a safe way, first /pool, then /dists and the rest
# + add documentation where to find /usr/bin/procmail

# Version: $Id: anonftpsync,v 1.24 2006/12/13 12:45:13 spaillar Exp $ 

# Note: You MUST have rsync 2.6.4 or newer, which is available in sarge
# and all newer Debian releases, or at [url]http://rsync.samba.org/[/url]

# Note: You need to install the package procmail, it contains 
# /usr/bin/lockfile, which is needed by this script.

# 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.

# Don't forget:
# chmod 744 anonftpsync

# TO is the destination for the base of the Debian mirror directory
# (the dir that holds dists/ and ls-lR).
# (mandatory)

TO=/media/sdb1

# RSYNC_HOST is the site you have chosen from the mirrors file.
# ([url]http://www.debian.org/mirror/list-full[/url])
# (mandatory)

RSYNC_HOST=ftp.de.debian.org

# RSYNC_DIR is the directory given in the "Packages over rsync:" line of
# the mirrors file for the site you have chosen to mirror.
# (mandatory)

RSYNC_DIR=debian/

# LOGDIR is the directory where the logs will be written to
# (mandatory)

LOGDIR=/var/log/spiegel

# ARCH_EXCLUDE can be used to exclude a complete architecture from
# mirrorring. Please use as space seperated list.
# Possible values are:
# alpha, amd64, arm, hppa, hurd-i386, i386, ia64, m68k, mipsel, mips, powerpc, s390, sh and sparc
#
# There is one special value: source
# This is not an architecture but will exclude all source code in /pool
#
# eg.
# ARCH_EXCLUDE="alpha arm hppa hurd-i386 ia64 m68k mipsel mips s390 sparc"
# 
# With a blank ARCH_EXCLUDE you will mirror all available architectures
# (optional)

ARCH_EXCLUDE="alpha arm hppa hurd-i386 ia64 m68k mipsel mips powerpc s390 sparc"

# EXCLUDE is a list of parameters listing patterns that rsync will exclude, in
# addition to the architectures excluded by ARCH_EXCLUDE.
#
# Use ARCH_EXCLUDE to exclude specific architectures or all sources
#
# --exclude stable, testing, unstable options DON'T remove the packages of
# the given distribution. If you want do so, use debmirror instead.
#
# The following example would exclude mostly everything:
EXCLUDE="\
  --exclude stable/ --exclude testing/ --exclude unstable/ \
  --exclude source/ \
  --exclude *.orig.tar.gz --exclude *.diff.gz --exclude *.dsc \
#  --exclude /contrib/ --exclude /non-free/ \
# "

# With a blank EXCLUDE you will mirror the entire archive, except the
# architectures excluded by ARCH_EXCLUDE.
# (optional)

# EXCLUDE=

# MAILTO is the address to send logfiles to;
# if it is not defined, no mail will be sent
# (optional)

MAILTO=

# There should be no need to edit anything below this point, unless there
# are problems.

#-----------------------------------------------------------------------------#

# Check for some environment variables
if [ -z $TO ] || [ -z $RSYNC_HOST ] || [ -z $RSYNC_DIR ] || [ -z $LOGDIR ]; then
	echo "One of the following variables seems to be empty:"
	echo "TO, RSYNC_HOST, RSYNC_DIR or LOGDIR"
	exit 2
fi

if ! [ -d ${TO}/project/trace/ ]; then
	# we are running mirror script for the first time
	umask 002
	mkdir -p ${TO}/project/trace
fi

# Note: on some non-Debian systems, hostname doesn't accept -f option.
# If that's the case on your system, make sure hostname prints the full
# hostname, and remove the -f option. If there's no hostname command,
# explicitly replace `hostname -f` with the hostname.

HOSTNAME=`hostname -f`

# The hostname must match the "Site" field written in the list of mirrors.
# If hostname doesn't returns the correct value, fill and uncomment below 
# HOSTNAME=mirror.domain.tld
 
LOCK="${TO}/Archive-Update-in-Progress-${HOSTNAME}"

# Exclude architectures defined in $ARCH_EXCLUDE
for ARCH in $ARCH_EXCLUDE; do
	EXCLUDE=$EXCLUDE"\
		--exclude binary-$ARCH/ \
		--exclude disks-$ARCH/ \
		--exclude installer-$ARCH/ \
		--exclude Contents-$ARCH.gz \
		--exclude *_$ARCH.deb \
		--exclude *_$ARCH.udeb "
	if [ "$ARCH" == "source" ]; then
		SOURCE_EXCLUDE="\
		--exclude *.tar.gz \
		--exclude *.diff.gz \
		--exclude *.dsc "
	fi
done

# Logfile
LOGFILE=$LOGDIR/debian-mirror.log

# 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
# Note: on some non-Debian systems, trap doesn't accept "exit" as signal
# specification. If that's the case on your system, try using "0".
trap "rm -f $LOCK > /dev/null 2>&1" exit

set +e

# First sync /pool
rsync --recursive --links --hard-links --times --verbose \
     $EXCLUDE $SOURCE_EXCLUDE \
     $RSYNC_HOST::$RSYNC_DIR/pool/ $TO/pool/ >> $LOGFILE 2>&1
result=$?

if [ 0 = $result ]; then
	# Now sync the remaining stuff
	rsync --recursive --links --hard-links --times --verbose --delay-updates --delete-after \
	     --exclude "Archive-Update-in-Progress-${HOSTNAME}" \
	     --exclude "project/trace/${HOSTNAME}" \
	     $EXCLUDE $SOURCE_EXCLUDE \
	     $RSYNC_HOST::$RSYNC_DIR $TO >> $LOGFILE 2>&1

	LANG=C date -u > "${TO}/project/trace/${HOSTNAME}"
else
	echo "ERROR: Help, something weird happened" | tee -a $LOGFILE
	echo "mirroring /pool exited with exitcode" $result | tee -a $LOGFILE
fi


if ! [ -z $MAILTO ]; then
	mail -s "debian archive synced" $MAILTO < $LOGFILE
fi

savelog $LOGFILE
 
Zuletzt bearbeitet von einem Moderator:
Du solltest da nicht alles exludieren ... wenn Du Etch haben willst, solltest Du "--exclude testing" weglassen ... und dafür die abschließenden Anführungszeichen bei der EXCLUDE-Liste mit dekommentieren ...
 
Okay, nun scheint's was zu werden. mal schauen, wenn es fertig ist.

Danke für die Tip's
 
So, ich hab das mal mir folgenden Einstellungen durchgezogen:

TO=/media/sdb1

# RSYNC_HOST is the site you have chosen from the mirrors file.
# (http://www.debian.org/mirror/list-full)
# (mandatory)

RSYNC_HOST=ftp.de.debian.org

# RSYNC_DIR is the directory given in the "Packages over rsync:" line of
# the mirrors file for the site you have chosen to mirror.
# (mandatory)

RSYNC_DIR=debian/

# LOGDIR is the directory where the logs will be written to
# (mandatory)

LOGDIR=/var/log/spiegel

# ARCH_EXCLUDE kann genutzt werden, um eine komlette Architektur von den Mirrorn
# auszuschliessen. Diese werden durch leerzeichen getrennt.
# Mögliche Einstellungen sind:
# alpha, amd64, arm, hppa, hurd-i386, i386, ia64, m68k, mipsel, mips, powerpc, s390, sh and sparc
#
# Das ist eine spezielle Einstellung: source
# Dies ist keine Architektur, aber es wird alle source code in /pool ausschliessen.
#
# Bsp.
# ARCH_EXCLUDE="alpha arm hppa hurd-i386 ia64 m68k mipsel mips s390 sparc"
#
# Mit einer blanken ARCH_EXCLUDE werden alle verfügbaren Architekturen herunterladen.
# (optional)

ARCH_EXCLUDE="alpha amd64 arm hppa hurd-i386 ia64 m68k mipsel mips powerpc s390 sh sparc source"

# EXCLUDE is a list of parameters listing patterns that rsync will exclude, in
# addition to the architectures excluded by ARCH_EXCLUDE.
#
# Use ARCH_EXCLUDE to exclude specific architectures or all sources
#
# --exclude stable, testing, unstable options DON'T remove the packages of
# the given distribution. If you want do so, use debmirror instead.
#
# The following example would exclude mostly everything:
EXCLUDE="\
--exclude stable/ --exclude unstable/ \
--exclude source/ \
--exclude *.orig.tar.gz --exclude *.diff.gz --exclude *.dsc \
--exclude /contrib/ --exclude /non-free/ \
"
#

Trotz, dass ich eigentlich alles, außer der testing binarys zugelassen hatte, wird laut Debian-mirror.log die sarge heruntegeladen, nicht die etch. Da wird dokumentiert, dass gerade die Debian Kernel 2.4.27 sarge und 2.6.8. sarge heruntergeladen. das wollter ich ja nicht grade.
Hat jemand eine Idee, was ich falsch gemacht haben könnte?
 

Ähnliche Themen

Q4OS 4.7 („Gemini“): Debian-Leichtgewicht mit Trinity-Desktop

wget lädt furchtbar langsam

Keine grafische Oberfläche (Debian Installation)

"non blocking console input" wieder rückgängig machen?

rsync Übertragung von Dateien zwischen zwei Servern

Zurück
Oben