rsync を実行する際にはリモートホストにも rsync がインストールされている必要がある

結論

タイトル通り。

補足

リモートホストに rsync が入っていない状態で手元で rsync を実行すると以下のようなエラーになる。

$ rsync -avuz hoge.txt foobar:/path/to/fuga.txt
zsh:1: command not found: rsync
rsync(92876): error: unexpected end of file
rsync(92876): error: io_read_nonblocking
rsync(92876): error: io_read_buf
rsync(92876): error: io_read_int
rsync(92876): warning: child 92877 exited with status 127

これを見ると手元に rsync が入っていないように思ってしまう。あるいは、引数をクォートする必要があると思ってしまう。さらにあるいは、転送しようとするファイルに何らかの問題があるのかとも思ってしまう。

しかし、これは単に foobar(リモートホスト) に rsync が入っていないだけである。

man

man7.org

Powered by はてなブログ