Red Hat Bugzilla – Bug 178790
Adding lftp command to get files from HTTP/FTP
Last modified: 2009-07-07 00:09:29 EDT
I used the information in this fedora mirror tutorial (thanks!), but I
encountered some difficultes because I don't have rsync internet access here,
and wget is limited in some way to do real mirroring like rsync.
Then I found some new way to do the mirroring: using lftp command!
lftp is powerful enough to work as the rsync command. It retrieves, checks the
files within a local directory, updates it, deletes old files from the local
disk, etc. It does recursive mirroring, and the main feature I was needing: it
supports the downloads on HTTP/FTP throught authenticated proxy (squid). So it
is a great tool for getting data in a non-rsync server.
I think it is interesting to include this command in this tutorial. I used the
following command to make an updates mirror for example:
lftp -e "set mirror:exclude-regex $REGEXEXCLUDE && open $DIRREMOTO && mirror
--delete --verbose && quit"
- REGEXECLUDE is a regular expression that excludes files/directories from the
mirroring. Perfect for excluding some archs or fedora releases as the tutorial
explained. For example, I used the expression "debug\/|repodata\/" to exclude
both debug/ and repodata/ directories in the updates to create my own with
- DIRREMOTO is the remote directory. For example, I used:
- It retrieves and checks in the current directory (pwd).
So it worked perfectly, and I would recommend it. If you need some help on more
usage, consult man lftp or I can help too :)
Excellent Hugo, thanks for the tip. I will get this added into the
Ticket moved to allow products to be removed from BZ.