[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Local repository

On Fri, 2005-04-22 at 14:05 +0200, Sasa Stupar wrote:
> --On 22. april 2005 12:16 +0200 Ralf Corsepius <rc040203 freenet de> wrote:
> > On Fri, 2005-04-22 at 11:48 +0200, Sasa Stupar wrote:
> >> Hi!
> >>
> >> I am going to make local repository for fedora updates and extras and I
> >> am  wondering what is the best tool for it: rsync or wget.
> > It depends on the remote server you are trying to mirror.
> >
> > If it provides rsync-access, then rsync probably is the preferable
> > choice.
> >
> > If it doesn't provide rsync-access, then other tools like wget, lftp,
> > curl or other tools (there are plenty of them, all have pros and cons)
> > are possible escapes.
> >
> > Ralf
> What I need is to also remove old versions automatically while transfering 
> the new ones. I was playing with wget mirror function but it takes 
> everything from the root dir on the remote server but I only need for fc3.
> Looks like lftp could do this job or am I mistaken?

I use the following script to mirror CentOS updates for my servers at
work ... it should be possible to modify it to work with fedora with
some tweaking.   One thing I like about wget is that you can specify a
maximum bandwidth so as to not swamp your internet connection.

The one thing you will have to check is the "--cut-dirs=8" this will
vary depending on your source repository layout.

# mirror-centos.sh - Mirror CentOS Linux Updates

# Variables
ARCHS="SRPMS i386 x86_64"

# Limit Transfer Rate to 10K bytes per second

# Do the mirror
for d in $VERSIONS; do
  for y in $ARCHS; do
    ## env http_proxy=$PROXY \
    wget --non-verbose --no-host-directories --cut-dirs=8 --mirror \
     --passive-ftp --limit-rate=$MAXRATE \
     --directory-prefix=$WBUPDATES/$d/updates/$y \

    # the RPMS should be checked for valid sigs, not ready for that yet
    ##rpm --checksig $WBUPDATES/$d/updates/$y/*.rpm | grep 'NOT OK'

# Done

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]