lftp client

Connect to host (TLS supported)

lftp -u myusername -p 'mypassword' www.example.com

For TLS connections in order to bypass the verification of the certificate use this in lftpd configuration file

set ssl:verify-certificate off

or after login enter the same command to lftp command prompt

lftp FTP client may be used for automated backups

create a file (my_site_ftp_backup.config) with the following content

lftp -u myusername,'mypassword' www.example.com
mirror --delete --exclude excluded_folder_1/* --exclude excluded_folder_2/* /source/folder/ /destination/folder/ .
quit

--delete option is used to delete files on destination that do not exist anymore on source

--exclude is used to prevent certain folders from being mirrored (downloaded) - may be used more times

run the script with the following command (may be used with cron also)

lftp -f my_site_ftp_backup.config

(use full path to the configuration file if not in the same directory)