[aclug-L] Mirroring debian (as asked in last nights meeting)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At last night meeting I mentioned wanting to set-up a personal mirror of
slink (main,contrib,non-free,non-us)
Roach (John) said he would post his script, but let me post mine that I
got from the debian web page. I know even if it worked it wouldn't get
non-us, but I want to get this to work for now.
I'm saving it to ~trbloom/debmirror because that is a seperate 4 gig
drive.
ok this is the script I currently have, if you have a better one feel
free to post it:
#! /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=/home/trbloom/debmirror
RSYNC_HOST=ftp.us.debian.org
RSYNC_DIR=/debian/
EXCLUDE="--exclude *alpha.deb --exclude *m68k.deb --exclude \
*powerpc.deb --exclude bo/ --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/ "
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
-----
it creates the following rsync log :
ERROR: The remote path must start with a module name
and returns to the command line
+-----------------------------------------------------+
| The Cheez-Czar http://www.hackboy.com/~cabrubak |
-------------------------------------------------------------------------------
>From The Chalkboard of Bart Simpson:
The Pledge of Allegiance does not end with "Hail Satan".
--------------------------------------------------------------------------------
---
This is the Air Capital Linux Users Group discussion list. If you
want to unsubscribe, send the word "unsubscribe" to
aclug-L-request@xxxxxxxxxxxx. If you want to post to the list, send your
message to aclug-L@xxxxxxxxxxxx.
- [aclug-L] Mirroring debian (as asked in last nights meeting),
cabrubak <=
|
|