Tag Archives: mirror

How to mirror a FTP folder and subfolders – lftp

I had to copy almost 10Gb from one server to another.
Usually I use rsync but this time the user that I have on the remove server is just an FTP user.

My first and dumb option was to use wget to fetch the content! *DUMB!*.
After a few hours/day… I got Write failed: Broken pipe.

OK!, I’v decided to use lftp.
So… I needed to install simply by doing….

apt-get install lftp

Let’s go!

Connect to the server

lftp storage.domain.org

Enter the username

user userexport

then enter the password…

and the the magic command!

mirroc -c -p

-c – resume option
-p – download files in parallel

HOORAY!, thats kinda it.

lftp [email protected]:~> mirror -c -p
Total: 2184 directories, 97729 files, 0 symlinks
New: 25548 files, 0 symlinks
9900721069 bytes transferred in 2750916 seconds (3.5 KiB/s)
lftp [email protected]:/>