3 ms·
Good scripting examples though in my opinion they left out the most fault tolerant option and that is using the "lftp" client [1] which happens to also speak SF
by LinuxBender 4y ago
Good scripting examples though in my opinion they left out the most fault tolerant option and that is using the "lftp" client [1] which happens to also speak SFTP and can mimic the behavior of rsync in a chroot sftp-only environment. One of the mirror sub-system options is "--loop" which can repeat the job until there are no differences based on the commands invoked. lftp's mirror subsystem can also spawn multiple TCP connections for a batch of files or even splitting up one large file into multiple streams, thus working around round-trip-time latency.
The downside of lftp's mirror subsystem is that directory enumeration is slower than rsync as there is no corresponding daemon on the other end to assist with the local aspect of remote enumeration. It is just using SFTP commands to do all the work.
[1] - https://linux.die.net/man/1/lftp https://linux.die.net/man/1/lftp
- blacksmith_tb 4y agoI can second this, I have made quite a few scripts using lftp (and also lstftp, and ncftp), and it's been the most reliable option.
- orev 4y ago> lftp's mirror subsystem is that directory enumeration is slower than rsync as there is no corresponding daemon on the other end This is a benefit for things like mirroring http hosted file repos, as many do not offer rsync due to security or increased load of running a service. Lftp still does a good job on those.