rsync 到没有安装 rsync 的远程服务器

Dan*_*Dan 5 rsync

是否可以 rsync 到没有安装 rysnc 的远程服务器?

我试图 rsync 到我们没有安装 rsync 的远程服务器,我收到的只是这个错误:

bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: remote command not found (code 127) at io.c(463) [receiver=2.6.8]
Run Code Online (Sandbox Code Playgroud)

Lam*_*ert 5

您可以使用将本地rsync二进制文件复制到其他服务器scp,然后rsync--rsync-path=PROGRAM指令一起使用,其中 PROGRAM 是上传rsync二进制文件的路径。

例如:

which rsync
/usr/bin/rsync
scp /usr/bin/rsync user@remote:~/rsync
rsync -a --rsync-path=~/rsync source dest 
Run Code Online (Sandbox Code Playgroud)