rsync'ing files between two remote servers, get errors stating rsync command not found on remote server

前端 未结 2 1708
无人及你
无人及你 2020-12-31 13:32

I\'m trying to rsync files between two servers with

rsync -avlzp /source user@server:/destination

but instead I get errors stating

2条回答
  •  孤城傲影
    2020-12-31 14:22

    rsync may be in the path on the remote machine when running an interactive shell, but not when running rsync by ssh (with a non-interactive shell). .bashrc is normally only run for interactive shells, for example, so if your path is defined there, it will not be parsed when running rsync --server on the remote end. Try /etc/profile. See bash(1) for more details.

    You can use --rsync-path to specify the path to the rsync binary on the remote machine.

提交回复
热议问题