Short answer – You can’t. rsync can’t use ftp as a remote host. So rsync does not work over ftp session/protocol. It only works with rsync protocol.
Long answer – rsync is a tool for doing syncs of two directories on a local system or a combination of local and remote systems. It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination. Rsync is widely used for backups and mirroring and as an improved copy command for everyday use. The remote system must have rsync or rsync daemon installed. So
If you must mirror files from local Unix/Linux system to the remote server. Try lftp command. It has builtin mirror which can download or update a whole directory tree. There is also reverse mirror (mirror -R) which uploads or updates a directory tree on server. Mirror can also synchronize directories between two remote servers, using FXP if available. The syntax is:
mirror source target
See our Linux / Unix: lftp Command Mirror Files and Directories faq for more information.Share this tutorial on: