[CentOS-mirror] Mirror setup (also new mirror announce)
stephen.weyland at mercuryblue.com.au
Mon Feb 27 22:29:44 UTC 2006
This is a howto I created for myself, my goal was the same as yours.
This has been previously posted.
### How to use rsync to create a local mirror of the insallation files
for CentOS, of course this could be used for anything else with
### We are going to create 2 files and edit a 3rd
### 1- Create a directory to store some files in.
### 2- A script to run rsync --- "update.sh"
### 3- An exclusion list so we don't download a bunch of stuff we don't
want --- "rsync-exclude.list"
### 4- We need to schedule the update to run by modifying --- /etc/crontab
1- Create a directory to store the files "update.sh" and
2- Create "update.sh" script to run rsync
# See a list of mirrors at
# --delete means delete files locally that no longer exist on the mirror
rsync -aqzH --exclude-from=/opt/mirror/rsync-exclude.list --delete
# make it executable
chmod 700 /opt/mirror/update.sh
3- Create an exclude list
# add a list of the files you want to be excluded in the rsync process
# files with a slash at the beginning are referenced to the root of the
rsync directory you connected to.
# in this case rsync.planetmirror.com/centos (the ::centos above is the
# files with a trailing slash indicate any directory with that name
anywhere. e.g "apt/" will skip any directory in any sub-tree named apt
# The following need to be excluded from /4/
# The following need to be excluded from all directories they are
present in, like /4/os/ and /4/updates/ ... We only want the i386
4- Add a line to /etc/crontab to run the job once a day or once a week
or whenever, the following shows run on the 1st minute, 1st hour, Sunday
1 1 * * sun root /opt/mirror/update.sh
William Dunn wrote:
> I would suggest lots of --exclude directives in your rsync script; for
> rsync -aqzH --partial --delete --exclude '/3.*' --exclude '/2.*'
> us-msync.centos.org::CentOS /foo/bar/pub/CentOS
> or, barring that,
> rsync -blah -blah --exclude '/2' --exclude '/2.1' --exclude '/3'
> --exclude '/3.1' --exclude and so forth
> I mean, I'm a n00b, and there's probably a better way to do it; but
> that should work (crosses fingers).
> I'd also like to take this opportunity to introduce myself. My name's
> Will, and I'm the Linux admin for the Computer Science Department at
> Virginia Tech. I've set up a publicly available CentOS mirror at
> http://mirror.cs.vt.edu/pub/CentOS and
> ftp://mirror.cs.vt.edu/pub/CentOS/ - At some point, there will be an
> entry page at http://mirror.cs.vt.edu/ but for the moment... there's not.
> I sync from us-msync once or twice a day, and I am planning on upping
> that to 4 times soon. My upload isn't capped (yet); I'm waiting to
> see how much interest there is in the mirror before I decide that it
> needs to be capped. We're tied into the University's OC48; but I am
> sharing with 20,000 students and faculty members.
> CS Technical Staff
> Virginia Tech
> weeteck at cnixal.com wrote:
>> Hi all,
>> I'm on my way to mirror CentOS but only intend to mirror CentOS 4. Any
>> help on how to rsync only the particular version?
>> CentOS-mirror mailing list
>> CentOS-mirror at centos.org
> CentOS-mirror mailing list
> CentOS-mirror at centos.org
More information about the CentOS-mirror