local mirror with rsync
Hi,
I'm trying to create a local mirror with the rsync mirroring
script from: http://www.debian.org/mirror/anonftpsync
I've changed the script so it should use my local settings, but
when I execute the script - it start to run the the server
I'm mirroring from but also copying files from my /. The script
looks like this:
#! /bin/sh
set -e
TO=/home/ftp/pub/linux/distributions/debian
RSYNC_HOST=sunsite.auc.dk
RSYNC_DIR=ftp/pub/os/linux/debian/
EXCLUDE="--exclude *alpha.deb --exclude *m68k.deb --exclude \
*powerpc.deb --exclude bo --exclude binary-alpha/
--exclude binary-m68k --exclude binary-powerpc/ --exclude Incoming/
--exclude local/ --exclude bo-unstable/ --exclude bo-updates/
--exclude binary-arm /"
LOCK="${TO}/Archive-Update-in-Progress-`hostname -f`"
cd $HOME
umask 002
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_HOST::$RSYNC_DIR $TO > rsync.log 2>&1
date -u > "${TO}/project/trace/`hostname -f`"
savelog rsync.log > /dev/null 2>&1
Does anyone have an idea why it starts to mirror from my / ?
Best regards
Allan
Reply to: