[elrepo] Creating local ELRepo mirror without rsync

Nikolay Ulyanitsky lystor at lystor.org.ua
Sun Nov 15 15:03:27 EST 2009


Hi

Small howto about creating local ELRepo mirror without rsync.

================================================================
   Method 1: lftp
================================================================
#!/bin/bash
SRC=http://elrepo.org/linux/
DST=/var/ftp/pub/elrepo/

cd $DST
lftp -e "mirror --delete --only-newer --verbose && exit" $SRC


================================================================
    Method 2: wget
================================================================
#!/bin/bash
SRC=http://elrepo.org/linux/
DST=/var/ftp/pub/elrepo/

wget \
    --mirror \
    --no-parent \
    --no-host-directories \
    --cut-dirs=1 \
    -P $DST \
    $SRC

find $DST -name 'index.html*' -exec rm -f {} \;

================================================================
Notes: wget can't remove old local files which have been removed from a server.


--
With best regards,
Nikolay Ulyanitsky
http://www.lystor.org.ua



More information about the elrepo mailing list