Effective mirroring ftp sites using lftp

I’ve spent quite same time using different tools for mirroring files from one ftp server to another or locally. Some time ago I’ve discovered LFTP, and decided to use it instead of other alternatives I’ve used over time like:

  • wget that is requiring high cpu usage and doesn’t support FTP as a destination
  • rsync – because you can’t allways install rsync on the ftp server.

Pros

  • high transfer speed
  • low cpu-usage (wget will kill your cpu!)
  • ftp-to-ftp support – both source and destination are FTP servers
  • FXP support – this would direct copy ftp from one server to another without sending them through your computer, still the FTP server must support this FTP protocol extension
  • parallel transfer support with advanced options
  • resume support
  • multiplatform – Linux, OS X, Windows
  • easy to install -like “yum install lftp”, or “port install lftp”
  • open-source

Cons

  • no native Win32, currently you have to install Cygwin but that contains lftp
  • the win32 version it’s not too stable on all systems I’ve tried it.
  • just one developer maintaining it, but the project is active

Some hints on lftp usage

  • --exclude Log :exclude directories containing string Log
  • --newer-than=now-5days : mirror only files newer than 5 days old
  • --continue : resume incomplete transfers
  • -e : remove files missing from the source

Include login and password into the URL like: ftp://user:password@ftp.acme.com/path/ but don’t forget to escape any special characters like /, $, .. from the username and password using url escaping (%xx).

Friday, July 4th, 2008 software

1 Comment to Effective mirroring ftp sites using lftp

  1. I think if you combine fast UDP based file transfer with RSYNC capability you will save even more time. For example a commercial solution such as FileCatalyst will give you the best of both worlds.

  2. John on January 15th, 2009

Leave a comment

Notice|Informare

Recently I moved all my articles related to internationalization to blog.i18n.ro Recent am mutat toate articolele mele referitoare la internaționalizare la adresa blog.i18n.ro

Language|Limbă