[mirror-admin] master server sync stats and recommendations
Dennis Gilmore
ausil at fedoraproject.org
Tue Apr 21 23:18:01 EDT 2009
On Tuesday 21 April 2009 08:40:08 pm Chris Adams wrote:
> Once upon a time, Matt Domsch <Matt_Domsch at dell.com> said:
> > On Tue, Apr 21, 2009 at 06:31:57PM -0500, Chris Adams wrote:
> > > A simple shell bit to compare your timestamp against a master and exit
> > > if they are the same:
> > >
> > > #######################################################################
> > ># MASTER=download3.fedora.redhat.com
> > > LOCAL=/data/mirror
> > > FILE=/pub/fedora/fullfilelist
> > >
> > > mstamp=$(curl -I http://$MASTER$FILE 2> /dev/null | grep
> > > '^Last-Modified:' | cut -d' ' -f2- | tr -d '\r') lstamp=$(LANG=C date
> > > -u '+%a, %d %b %Y %T GMT' -d @$(stat -c '%Y' $LOCAL$FILE)) [ "$mstamp"
> > > = "$lstamp" ] && exit 0
> > > #######################################################################
> > >#
> >
> > Thanks for this!
>
> Just as a test, I put this at the top of my enchilada and EPEL sync
> scripts. I saw the EPEL fullfilelist date change with no apparent other
> file changes, so you might want to check on the generation (is there
> some condition where it would put a new copy in place despite no files
> being changed?).
there is, if i run a push and there is no packages to push. it doesnt happen
often but it has happened a few times.
Dennis
--
More information about the Mirror-admin
mailing list