Ftp directory upload

ftp

I am uploading data from a hosting server to an FTP server. There are many folders inside the main folder that I'm trying to send via FTP. put/wput won't work for me because they only handle individual files. I am now trying lftp but I am getting the following issue:

lftp -e "mirror -R /root/temp/mail  /mail1" -u user,pass dest_ip
Getting directory contents (0) [Making data connection...]

It stays at "Making data connection…" but meanwhile it creates the mail folder on my FTP server.

How can I upload all of my folders and files to the FTP server?

Best Answer

You're likely hung in an SSL negotation. Add set ftp:ssl-allow off to either your individual command or your ~/.lftprc file. E.g.

lftp -e "set ftp:ssl-allow off; mirror -R /root/temp/mail /mail1" -u user,pass dest_ip

If you set it in your config, just know that you're keeping yourself from using any SSL encryption security features that might be on the remote host (HAW HAW HAW).

Bonus Answer: scp(1)

Related Topic