[CentOS-mirror] Syncing of CentOS 5 to mirrors.

Ross Hosman ross at dillio.net
Fri Apr 13 05:07:19 UTC 2007

Thanks but the entire 5 tree is already synced so I don't know why it is going a bit crazy.


----- Original Message -----
From: "Prof. P. Sriram" <sriram at ae.iitm.ac.in>
To: "Mailing list for CentOS mirrors." <centos-mirror at centos.org>
Sent: Friday, April 13, 2007 12:04:56 AM (GMT-0600) America/Chicago
Subject: Re: [CentOS-mirror] Syncing of CentOS 5 to mirrors.

On Fri, 13 Apr 2007, Ross Hosman wrote:
> Does anyone see anything wrong with this crontab 
> * */6 * * * rsync -avz [blah blah blah]

well, nothing seriously wrong, except you keep launching every four hours, 
no matter what. so, if a sync does not complete in four hours, you will 
see multiple instances. i would suspect that the entire 5 tree is not 
syncing up in 4 hours, so you see multiple instances. i will offer a 
couple of suggestions.

ditch the z option; most content is already compressed, why try another z 
on top of it? only end up causing needless cpu load.

write a small script and call the script from crontab; the script could
have a couple of lines to do locking so multiple instances will not occur
- it would look like so (shameless lifted from debian)

HOSTNAME=`hostname -f`
# Check to see if another sync is in progress
if lockfile -! -l 43200 -r 0 "$LOCK"; then
  echo ${HOSTNAME} is unable to start rsync, lock file exists
  exit 1

CentOS-mirror mailing list
CentOS-mirror at centos.org

More information about the CentOS-mirror mailing list