Rsync.redhat

From PTAGISWiki

Jump to: navigation, search

How to keep an RPM repository up to date

From lfarkas@mindmaker.hu Thu Apr 6 09:22:01 2000 Date: Thu, 06 Apr 2000 10:16:25 +0200 From: Levente Farkas <lfarkas@mindmaker.hu> To: Mirror Red Hat <mirror-list@redhat.com> Cc: Andrew E. Mileski <andrewm@netwinder.org> Subject: Re: rsync parameters Resent-Date: 6 Apr 2000 08:17:10 -0000 Resent-From: mirror-list@redhat.com Resent-cc: recipient list not shown: ;

"Andrew E. Mileski" wrote: > > Levente Farkas wrote: > > could someone send me the rsync command line parameters used to mirror > > redhat. I'd like to mirror just current/i386, updates/i386 without > > any SRPM. > > Well, it might look like this. The usual disclaimers apply. This pulls down 6.2 > and later stuff only. If you are mirroring updates, then you really should provide > them all if possible. > > #! /bin/sh > RSYNC='rsync -rlptv --delete --delete-excluded --force --stats' > MIRROR=/home/ftp/pub/mirrors > > $RSYNC rh-mirror.redhat.com::redhat \ > --exclude=.snapshot \ > --exclude=.nfs* \ > --exclude=ls-lR* \ > --exclude=*alpha/ --exclude=*alpha*.iso \ > --exclude=*sparc/ --exclude=*sparc*.iso \ > --exclude=*SRPM*/ --exclude=*.src.rpm \ > --include=/current \ > --include=/redhat-[7-9]*/ \ > --include=/redhat-6.[2-9]*/ \ > --exclude=/redhat-*/ \ > --include=/updates/[7-9]*/ \ > --include=/updates/6.[2-9]*/ \ > --include=/updates/current \ > --exclude=/updates/?* \ > --include=/updates/ \ > --exclude=/* \ > $MIRROR/redhat/redhat

after a modify and simplify your script in order to find the problem, I've got the following script:


  1. ! /bin/sh

RSYNC='rsync -avHS --delete --delete-excluded --force --stats --size-only -n' LOCALDIR=/pub/ftp-data/pub/linux/redhat/redhat

$RSYNC rh-mirror.redhat.com::redhat \

       --exclude=.snapshot \
       --exclude=.nfs* \
       --exclude=ls-lR* \
       --exclude=*.iso \
       --exclude=*alpha/ \
       --exclude=*sparc/ \
       --exclude=*SRPM*/ \
       --exclude=*.src.rpm \
       --include=/current \
       --include=/redhat-6.2/i386 \
       --exclude=/redhat-*/ \
       --exclude=/* \
       $LOCALDIR

I already have the 6.2 tree under /pub/ftp-data/pub/linux/redhat/redhat/redhat-6.2/ (that's the reason for --size-only -n) but I try /pub/ftp-data/pub/linux/redhat/redhat/redhat-6.2 /pub/ftp-data/pub/linux/redhat/redhat /pub/ftp-data/pub/linux/redhat as LOCALDIR and non of them help. rsync always try to delete the whole redhat-6.2 tree (the output


deleting in . deleting redhat-6.2/i386/misc/CVS/Root deleting redhat-6.2/i386/misc/CVS/Repository deleting redhat-6.2/i386/misc/CVS/Entries deleting directory redhat-6.2/i386/misc/CVS deleting directory redhat-6.2/i386/misc deleting redhat-6.2/i386/images/pcmcia.img ....


what can be the problem ? I'd be very happy with any help.

ps. why rsync doesn't support list ? it'd be a very basic feature like rsync rh-mirror.redhat.com::redhat/redhat-6.2

-- lfarkas
"The only thing worse than not knowing the truth is
 ruining the bliss of ignorance."

-- To unsubscribe: mail -s unsubscribe mirror-list-request@redhat.com < /dev/null

Personal tools