[mirror-admin] Mirror Prep Consensus?
Dale Bewley
dlbewley at lib.ucdavis.edu
Tue Sep 9 17:36:18 EDT 2008
On Mon, 2008-09-08 at 19:59 -0400, Chuck Anderson wrote:
> On Mon, Sep 08, 2008 at 04:46:05PM -0700, C.M. Connelly wrote:
> > "CC" == Carlos Carvalho <carlos at fisica.ufpr.br>
> >
> > CC> You can start with something like "for i in *; do cp -a $i
> > CC> $i.newkey; done" in linux/updates/[89]. There are others
> > CC> but they seem to not be in the masters yet.
> >
> > Yeah -- that's the question. I already have the updates
> > directories, so there's no savings to be had there, but for the
> > releases directory, do I need to duplicate each architecture
> > directory under each of Everything, Fedora, and Live for both 8
> > and 9? (ATM, that's about 200 GB.)
>
> The newkey versions of releases/ haven't been provided yet, but when
> they are they will be:
>
> .../os.newkey
> .../debug.newkey
> .../SRPMS.newkey
>
> etc. for each spin and architecture under releases/8 and releases/8.
>
> --
Is this sane if not overkill? It isn't tested.
#!/bin/bash
# Seed downstream Fedora mirror to minimize the rsync traffic
# from upstream during the eminent sync of .newkey releases content.
RELEASE_ROOT=/var/www/html/pub/mirrors/fedora/linux/releases
RELEASES='8 9'
ARCHES='i386 x86_64'
# Files in releases/9/Fedora/x86_64/os/Packages and
# releases/9/Everything/x86_64/os/Packages
# seem to be hard linked. Is there a smarter way to do this?
for rel in $RELEASES; do
for arch in $ARCHES; do
echo "# fedora $rel $arch"
echo -n "cp -a $RELEASE_ROOT/$rel/Fedora/$arch/os "
echo "$RELEASE_ROOT/$rel/Fedora/$arch/os.newkey";
# does this mirror carry Everything?
if [ -r "$RELEASE_ROOT/$rel/Everything" ]; then
echo "mkdir -p $RELEASE_ROOT/$rel/Everything/$arch/os.newkey"
# recreate hardlink packages from Fedora to Everything
echo -n "cp -l $RELEASE_ROOT/$rel/Fedora/$arch/os/Packages "
echo "$RELEASE_ROOT/$rel/Everything/$arch/os.newkey/"
# repodata and repoview don't seem to be hardlinks
echo -n "cp -a $RELEASE_ROOT/$rel/Everything/$arch/os/repodata "
echo "$RELEASE_ROOT/$rel/Everything/$arch/os.newkey/"
echo -n "cp -a $RELEASE_ROOT/$rel/Everything/$arch/os/repoview "
echo "$RELEASE_ROOT/$rel/Everything/$arch/os.newkey/"
# and debug
echo -n "cp -a $RELEASE_ROOT/$rel/Everything/$arch/debug "
echo "$RELEASE_ROOT/$rel/Everything/$arch/debug.newkey"
fi
done
# and finally don't forget the source if you carry Everything
echo "# fedora $rel source"
if [ -r "$RELEASE_ROOT/$rel/Everything" ]; then
echo -n "cp -a $RELEASE_ROOT/$rel/Everything/source/SRPMS "
echo "$RELEASE_ROOT/$rel/Everything/source/SRPMS.newkey"
fi
echo
done
--
Dale Bewley - Unix Administrator - Shields Library - UC Davis
GPG: 0xB098A0F3 0D5A 9AEB 43F4 F84C 7EFD 1753 064D 2583 B098 A0F3
--
More information about the Mirror-admin
mailing list