[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: your mail



On Sun, Jun 25, 2000 at 08:25:58PM -0600, Anthony Fok wrote:
> 有詳細信息。他們建議的 mirror 方法,是用 rsync。我把他們的范例
> sh 腳本 "anonftpsync" 附在本文後,歡迎參考。基本上,是把您不要的
> 平台 "exclude" 掉就可以了。

  哈哈,我又忘了 attach 了。再來一次。 ^_^  anonftpsync 來自

	http://www.debian.org/mirror/anonftpsync

					東東

-- 
Anthony Fok Tung-Ling                Civil and Environmental Engineering
foka@ualberta.ca, foka@debian.org    University of Alberta, Canada
Come visit Our Lady of Victory Camp -- http://www.olvc.ab.ca/

-- 
| This message was re-posted from debian-simplified-chinese@lists.debian.org
| and converted from gb2312 to big5 by an automatic gateway.
#! /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 *alpha.deb --exclude *m68k.deb --exclude \
#    *powerpc.deb --exclude stable/ --exclude bo/ --exclude \
#    /contrib/ --exclude /non-free/ --exclude source/ --exclude \
#    /Debian-1.3* --exclude binary-alpha/ --exclude binary-m68k/ \
#    --exclude binary-powerpc/ --exclude Incoming/ --exclude \
#    local/ --exclude bo-unstable/ --exclude bo-updates/ "

TO=
RSYNC_HOST=
RSYNC_DIR=debian/
EXCLUDE=

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_HOST::$RSYNC_DIR $TO > rsync.log 2>&1
date -u > "${TO}/project/trace/`hostname -f`"
savelog rsync.log > /dev/null 2>&1
-- 
| This message was re-posted from debian-simplified-chinese@lists.debian.org
| and converted from gb2312 to big5 by an automatic gateway.

Reply to: