HostOnNet Blog

lftp

Looking for Linux Server Admin or WordPress Expert? We can help.

lftp is a command line FTP program.

Download All Content of a Website

Lets say we want to download all content of web site client-website.com, run following commands

mkdir client-website.com
cd client-website.com
lftp -d -u FTP_USER_NAME,FTP_PASSWORD FTP_SERVER_IP_ADDR
set ftp:ssl-allow no
cd public_html
mirror

Now we have all web site files on our computer.

Upload All Content to a Website

Now we connect to clients new NEW_FTP_SERVER_IP_ADDR, this may have different user name and password.

cd client-website.com
lftp -d -u FTP_USER_NAME,FTP_PASSWORD NEW_FTP_SERVER_IP_ADDR
set ftp:ssl-allow no
cd public_html
mirror -R

mirror -R will do reverse mirror, that is upload.

More LFTP related Blog Posts:

lftp using active mode for file transfer

Posted in FTP

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.