Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

#!/bin/bash
/usr/bin/rsync -rtLv --progress rsync://pubmirrors.reflected.net/centos/5/ --exclude=debug/ --exclude=isos/ /var/www/html/centos/5/
/usr/bin/rsync -rtLv --progress rsync://pubmirrors.reflected.net/centos/5.5/ --exclude=debug/ --exclude=isos/ /var/www/html/centos/5.5/
/usr/bin/rsync -rtLv --progress rsync://pubmirrors.reflected.net/centos/5.4/ --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

1 Answer 1

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="centos.mbni.med.umich.edu::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

 
discard

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.