Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a tons of centos servers and i got tired of updating and connecting to a slow mirror and waiting a long time for updates. So i decided just to create a local repository server.

Here is my script to sync

/usr/bin/rsync -rtLv --progress rsync:// --exclude=debug/ --exclude=isos/ /var/www/html/centos/5/
/usr/bin/rsync -rtLv --progress rsync:// --exclude=debug/ --exclude=isos/ /var/www/html/centos/5.5/
/usr/bin/rsync -rtLv --progress rsync:// --exclude=debug/ --exclude=isos/ /var/www/html/centos/5.4/

My question is: Isn't the /5/ dir supposed to be a sym link to 5.5 or what ever the most current version is? Did my rsync script just treat it folder and download all the 5.5 files twice or is there some legitimate difference between /5/ and /5.5/

share|improve this question
up vote 2 down vote accepted

5 is typically the latest version and is usually a symlink but it depends on a mirror.

We use this for our local mirror:

export MIRROR=""

rsync -v -azH --exclude=HEADER.html --exclude=HEADER.images --exclude=SRPMS --de
lete-excluded ${MIRROR}/5/updates/ /export/centos/5/updates/
rsync -v -azH --exclude=HEADER.html --exclude=HEADER.images --exclude=SRPMS --de
lete-excluded ${MIRROR}/5/centosplus/ /export/centos/5/centosplus/
rsync -v -azH --exclude=HEADER.html --exclude=HEADER.images --exclude=SRPMS --de
lete-excluded ${MIRROR}/5/os/ /export/centos/5/os/
rsync -v -azH --exclude=HEADER.html --exclude=HEADER.images --exclude=SRPMS --de
lete-excluded ${MIRROR}/5/extras/ /export/centos/5/extras/

find /export/centos/5/ \( -not -type l -and -not -type d \) -and \( -not -perm 6
60 -or \( -not -group apache -or -not -user apache \) \) -exec chown apache:apac
he {} \; -exec chmod 660 {} \;
find /export/centos/5/ -type d -not -type l -exec chown apache:apache {} \; -exe
c chmod 770 {} \;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.