Linux / Unix: Use rsync Command Over FTP

How do I use rsync command to sync files to a remote host called web-42.vps running VSFTPD ftp server? Can you give me rsync ftp example for Unix like operating systems?

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.

Tutorial details
Difficulty Intermediate (rss)
Root privileges No
Requirements lftp/ncftp
Time N/A
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

The solution

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.

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • jet Apr 11, 2013 @ 0:45

    Or mount ftp resource locally with curlftpfs and then sync

Leave a Reply

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

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.