lftp command for mirroring FTP

Mirror Backups with lftp

What this command does

Reverse mirror direction. Flow diagram: Local backups to Remote backup directory (mirror -R)
© juzhax.com

The historical example uploads a local directory to a remote server using reverse mirroring. Plain FTP is not encrypted, and credentials supplied on the command line can be exposed in history or process listings. Prefer SFTP or properly configured FTPS, use securely managed credentials and a trusted host, and verify the remote archive identities and sizes after transfer. The hostname and credentials below are illustrative; do not run the command unchanged.

Original article (2013)

lftp -e 'mirror -R /home/backups/ /backups/;bye' -u user,password ftp.juzhax.com