up vote 1 down vote favorite
share [g+] share [fb]

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/

link|improve this question

62% accept rate
feedback

1 Answer

up vote 1 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 {} \;
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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