User Tools

Site Tools


centos_local_repo_rsync

This is an old revision of the document!


#!/bin/bash
 
# name: centos-rsync
# date: 20110711
# author: jason thomas <jthomas@blip.tv>
# purpose: update local centos mirror with remote centos mirror
 
LOCK="/var/lock/subsys/centos-rsync"
REPO="/var/www/kitchen/htdocs/repos/centos"
MIRROR="mirror.cogentco.com"
 
CURRENT5="5.6"
CURRENT6="6.0"
 
 
sync_repo(){
  ( flock 200
  if [ -d $REPO/$@ ] ; then
     rsync  -avSHP --delete --exclude "local*" --exclude "isos" --exclude "i386" $MIRROR::CentOS/$@/ $REPO/$@/
  fi
  ) 200>$LOCK$@ 
}
 
sync_repo $CURRENT5 &
sync_repo $CURRENT6 &
centos_local_repo_rsync.1310408778.txt.gz ยท Last modified: 2020/08/10 02:28 (external edit)