lftp mirror of a directory

open http://mirror.vcu.edu

cd /pub/gnu+linux/centos/6.0/isos

/i386# mirror the 64 bit centos 6
mirror \
-c -e \
–verbose \
.  /opt/iso/centos/6_32bit \
–exclude .torrent \
–exclude .iso \
-i CentOS-6.0-i386-netinstall.iso \
-i CentOS-6.0-i386-minimal.iso \
-i CentOS-6.0-i386-LiveCD.isocd /pub/gnu+linux/centos/6.0/isos/x86_64mirror \
-c -e \
–verbose \
. /opt/iso/centos/6_64bit \
–exclude .torrent \
–exclude .iso \
-i CentOS-6.0-x86_64-netinstall.iso \
-i CentOS-6.0-x86_64-minimal.iso \
-i CentOS-6.0-x86_64-LiveCD.iso#CentOS-6.0-i386-LiveDVD.iso
#CentOS-6.0-i386-bin-DVD.iso
#CentOS-6.0-i386-minimal.iso
#CentOS-6.0-i386-netinstall.iso

#get -c -e \
#       /pub/gnu+linux/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-minimal.iso \
#       -o /opt/iso/centos/6_64bit
#       /pub/gnu+linux/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-netinstall.iso \
#       -o /opt/iso/centos/6_64bit
#       /pub/gnu+linux/centos/6.0/isos/x86_64/CentOS-6.0-x86_64-LiveCD.iso \
#       -o /opt/iso/centos/6_64bit

exit

  • Examples:#lftp -e “set net:timeout 10; cd IN; mput FILENAME ; ls -l;bye” -u “USERNAME”,”PASSWORD” HOSTNAME
    # verify file size:
    #lftp -e “set net:timeout 10; cd IN; ls -l;bye” -u “USERNAME”,”PASSWORD” HOSTNAME
    # remove file
    #lftp -e “set net:timeout 10; cd IN; rm FILENAME ;bye”-u “USERNAME”,”PASSWORD” HOSTNAME

Resources:

  • http://www.cyberciti.biz/faq/lftp-mirror-example/
  • russbrooks.com/2010/11/19/lftp-cheetsheet
  • http://www.kenhess.com/4436.html