..rsync error (code 12) kills lan mirroring
Hi,
..I'm trying to move a local mirror to another box; and decided it
oughtta be rsynced, not wget'ed or scp'ed across.
..so I first tossed in:"
rsync stream tcp nowait root \
/usr/bin/rsync rsyncd --daemon
"
...into /etc/inetd.conf and then fired it up:
cat /home/knoppix/rsync.log
add_exclude(Archive-Update-in-Progress-Knoppix,exclude)
add_exclude(project/trace/Knoppix,exclude)
add_exclude(binary-alpha/,exclude)
add_exclude(binary-arm/,exclude)
add_exclude(binary-m68k/,exclude)
add_exclude(binary-powerpc/,exclude)
add_exclude(binary-sparc/,exclude)
add_exclude(binary-ia64/,exclude)
add_exclude(binary-mips*/,exclude)
add_exclude(binary-hppa/,exclude)
add_exclude(binary-sh/,exclude)
add_exclude(binary-s390/,exclude)
add_exclude(binary-hurd-i386/,exclude)
add_exclude(*_alpha.deb,exclude)
add_exclude(*_arm.deb,exclude)
add_exclude(*_m68k.deb,exclude)
add_exclude(*_powerpc.deb,exclude)
add_exclude(*_sparc.deb,exclude)
add_exclude(*_ia64.deb,exclude)
add_exclude(*_hppa.deb,exclude)
add_exclude(*_sh.deb,exclude)
add_exclude(*_mips.deb,exclude)
add_exclude(*_mipsel.deb,exclude)
add_exclude(*_s390.deb,exclude)
add_exclude(*_hurd-i386.deb,exclude)
add_exclude(disks-alpha/,exclude)
add_exclude(disks-arm/,exclude)
add_exclude(disks-i386/,exclude)
add_exclude(disks-ia64/,exclude)
add_exclude(disks-m68k/,exclude)
add_exclude(disks-mips*/,exclude)
add_exclude(disks-powerpc/,exclude)
add_exclude(disks-s390/,exclude)
add_exclude(disks-sparc/,exclude)
add_exclude(stable/,exclude)
add_exclude(testing/,exclude)
add_exclude(unstable/,exclude)
add_exclude(source/,exclude)
add_exclude(*.orig.tar.gz,exclude)
add_exclude(*.diff.gz,exclude)
add_exclude(*.dsc,exclude)
opening tcp connection to 192.168.2.222 port 873
rsync: read error: Connection reset by peer
rsync error: error in rsync protocol data stream (code 12) at io.c(177)
_exit_cleanup(code=12, file=io.c, line=177): about to call exit(12)
..cat-n-diff wrapped to 72 char's:
knoppix@ttyp9[sbin]$ cat a-non-US-ftpsync
#! /bin/sh
set -e
# This script originates from http://www.debian.org/mirror/anonftpsync
# Note: You MUST have rsync 2.0.16-1 or newer, which is available in
# slink and all newer Debian releases, or at http://rsync.samba.org/
# 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).
# TO=/var/www/debian-non-US
TO=/mnt/hda11/debian-non-US
# RSYNC_HOST is the site you have chosen from the mirrors file.
# (http://www.debian.org/mirror/list-full)
# RSYNC_HOST=ftp.no.debian.org
RSYNC_HOST=192.168.2.222
# RSYNC_DIR is the directory given in the "Packages over rsync:" line of
# the mirrors file for the site you have chosen to mirror.
RSYNC_DIR=debian-non-US
# EXCLUDE is a list of parameters listing patterns that rsync will
# exclude. The following example would exclude mostly everything:
#EXCLUDE="\
# --exclude binary-alpha/ --exclude binary-arm/ --exclude binary-i386/
# \--exclude binary-m68k/ --exclude binary-powerpc/ --exclude
# binary-sparc/ \--exclude binary-ia64/ --exclude binary-mips*/
# --exclude binary-hppa/ \--exclude binary-sh/ --exclude binary-s390/ \
# --exclude binary-hurd-i386/ \
# --exclude *_alpha.deb --exclude *_arm.deb --exclude *_i386.deb \
# --exclude *_m68k.deb --exclude *_powerpc.deb --exclude *_sparc.deb \
# --exclude *_ia64.deb --exclude *_hppa.deb --exclude *_sh.deb \
# --exclude *_mips.deb --exclude *_mipsel.deb --exclude *_s390.deb \
# --exclude *_hurd-i386.deb \
# --exclude disks-alpha/ --exclude disks-arm/ --exclude disks-i386/ \
# --exclude disks-ia64/ --exclude disks-m68k/ --exclude disks-mips*/ \
# --exclude disks-powerpc/ --exclude disks-s390/ --exclude
# disks-sparc/ \--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.
EXCLUDE="\
--exclude binary-alpha/ --exclude binary-arm/ \
--exclude binary-m68k/ --exclude binary-powerpc/ \
--exclude binary-sparc/ \ --exclude binary-ia64/ \
--exclude binary-mips*/--exclude binary-hppa/ \
--exclude binary-sh/ --exclude binary-s390/ \
--exclude binary-hurd-i386/ \
--exclude *_alpha.deb --exclude *_arm.deb \
--exclude *_m68k.deb --exclude *_powerpc.deb --exclude *_sparc.deb \
--exclude *_ia64.deb --exclude *_hppa.deb --exclude *_sh.deb \
--exclude *_mips.deb --exclude *_mipsel.deb --exclude *_s390.deb \
--exclude *_hurd-i386.deb \
--exclude disks-alpha/ --exclude disks-arm/ --exclude disks-hppa/ \
--exclude disks-ia64/ --exclude disks-m68k/ --exclude disks-mips*/ \
--exclude disks-powerpc/ --exclude disks-s390/
--exclude disks-sparc/ \
--exclude stable/ --exclude testing/ --exclude unstable/ \
--exclude source/ \
--exclude *.orig.tar.gz --exclude *.diff.gz --exclude *.dsc \
"
# There should be no need to edit anything below this point, unless
# there are problems.
#----------------------------------------------------------------------
#-------#
# 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`
LOCK="${TO}/Archive-Update-in-Progress-${HOSTNAME}"
# 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
rsync -v -v \
--recursive --links --hard-links --times --verbose \
--compress --delete --exclude \
"Archive-Update-in-Progress-${HOSTNAME}" \
--exclude "project/trace/${HOSTNAME}" \
$EXCLUDE \
$RSYNC_HOST::$RSYNC_DIR $TO > rsync.log 2>&1
date -u > "${TO}/project/trace/${HOSTNAME}"
# Note: if you don't have savelog, use any other log rotation facility,
# or comment this out, the log will simply be overwritten each time.
# savelog rsync.log > /dev/null 2>&1
knoppix@ttyp9[sbin]$ diff -ruN *
--- a-non-US-ftpsync 2004-01-14 07:14:00.000000000 +0100
+++ anonftpsync 2004-01-14 07:15:23.000000000 +0100
@@ -15,8 +15,8 @@
# TO is the destination for the base of the Debian mirror directory
# (the dir that holds dists/ and ls-lR).
-# TO=/var/www/debian-non-US
-TO=/mnt/hda11/debian-non-US
+# TO=/var/www/debian
+TO=/mnt/hda11/debian
# RSYNC_HOST is the site you have chosen from the mirrors file.
# (http://www.debian.org/mirror/list-full)
@@ -27,7 +27,7 @@
# RSYNC_DIR is the directory given in the "Packages over rsync:" line
of # the mirrors file for the site you have chosen to mirror.
-RSYNC_DIR=debian-non-US
+RSYNC_DIR=debian
# EXCLUDE is a list of parameters listing patterns that rsync will
exclude. # The following example would exclude mostly everything:
@@ -100,7 +100,7 @@
trap "rm -f $LOCK > /dev/null 2>&1" exit
set +e
-rsync -v -v --recursive --links --hard-links --times --verbose \
--compress --delete \
+rsync --recursive --links --hard-links --times --verbose
--compress --delete \
--exclude"Archive-Update-in-Progress-${HOSTNAME}" \
--exclude"project/trace/${HOSTNAME}" $EXCLUDE \
knoppix@ttyp9[sbin]$
..( /mnt/hda11/ is becoming /var/www/ .)
..these scripts works with RSYNC_HOST=ftp.no.debian.org, what am I doing
wrong with my 192.168.2.222?
--
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
Scenarios always come in sets of three:
best case, worst case, and just in case.
Reply to: