[CentOS-mirror] Best Practice to sync only certain versions

Mon Jun 23 15:12:51 UTC 2008
Todd Reed <treed at astate.edu>

We are considering only syncing 4 & 5 on our internal mirror.  Below is
a script that was on the CentOS Mirror site.  Would I be able to use
this script to sync only 4 or 5?  Or, is there a better way to
accomplish this?

 

Regards,

Todd

 

 

File:        sync_centos.sh

------------------------------

 

#!/bin/sh

 

rsync="/usr/local/bin/rsync -aqHz --delete --delay-updates
--bwlimit=10240"

 

# this should be auto-selected, but the centos mirror script doesn't  

# support selection by a specific protocol (i.e., rsync)

mirror=RSYNCURLGOESHERE::mirrors/centos

 

ver=4

archlist="i386 x86_64"

baselist="os updates"

local=/opt/mirrors/centos

 

for arch in $archlist

do

  for base in $baselist

  do

    remote=$mirror/$ver/$base/$arch/

    $rsync $remote $local/$ver/$base/$arch/

  done

done

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-mirror/attachments/20080623/2cdaa76f/attachment-0004.html>