来自 rsync 的联机帮助页
概要
Run Code Online (Sandbox Code Playgroud)Local: rsync [OPTION...] SRC... [DEST] Access via remote shell: Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST] Push: rsync [OPTION...] SRC... [USER@]HOST:DEST Access via rsync daemon: Pull: rsync [OPTION...] [USER@]HOST::SRC... [DEST] rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST] Push: rsync [OPTION...] SRC... [USER@]HOST::DEST rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST只有一个 SRC arg 而没有 DEST arg 的用法将列出源文件而不是复制
一般的
...
Rsync 将本地端称为“客户端”,将远程端称为“服务器”。不要将“服务器”与 rsync守护进程混淆——守护进程始终是服务器,但服务器既可以是守护进程,也可以是远程 shell 生成的进程。
设置
有关安装说明,请参阅文件 README。
安装后,您可以将 rsync 用于您可以通过远程 shell 访问的任何机器(以及您可以使用 rsync 守护进程模式协议访问的一些机器)。对于远程传输,现代 rsync 使用 ssh 进行通信,但默认情况下它可能已配置为使用不同的远程 shell,例如 rsh 或 remsh。
您还可以通过使用 -e 命令行选项或设置 RSYNC_RSH 环境变量来指定您喜欢的任何远程 shell。
请注意,源计算机和目标计算机上都必须安装 rsync。
从概要来看,rsync 可用于
在本地和远程或本地和本地之间传输文件。
在本地和远程之间传输文件时,
通过远程shell访问
通过 rsync 守护进程访问
列出源文件
我的问题是
通过 rsync 守护进程访问在本地和远程之间传输文件时,远程主机是否需要将 rsync 作为守护进程运行?
通过远程shell访问在本地和远程之间传输文件时,远程主机是否需要运行rsync?如果是,远程主机是将 rsync 作为服务器运行而不是作为守护程序运行,还是就像本地主机将 rsync 作为客户端运行一样?
在本地主机内传输文件时,本地主机是否需要运行 rsync 客户端和 rsync 服务器?
列出源文件而不是复制时,如果源在远程主机中,远程主机是否需要将 rsync 作为服务器或守护程序运行?
“注意必须在源计算机和目标计算机上都安装 rsync”分别适用于和不适用于哪些用例?
在 GENERAL 部分,“服务器可以是守护进程或远程 shell 生成的进程”。远程主机将 rsync 作为服务器作为“远程外壳衍生进程”运行是否意味着远程主机以与本地主机运行 rsync 相同的方式运行 rsync?
请注意,源主机和目标主机可以是本地主机或远程主机。
当涉及到 rsync 时,可以将client其server视为相同的 rsync 二进制文件可以实现的角色。当它作为守护进程运行时,您构建一个 rsyncd.conf 文件,并使用--daemon参数运行 rsync 。
一个 rsync 二进制文件可以直接连接到另一个(远程)rsync 二进制文件 - 如果 rsync 作为守护进程运行,在远程主机上侦听它自己的连接,或者通过远程 shell 执行 - 其中 rsync 使用 ssh 连接到远程主机并执行该主机上的 rsync 二进制文件,两个 rsync 进程相互来回传递数据。
希望回答您的问题:
When transferring files between local and remote by accessing via
rsync daemon, is the remote host required to run rsync as a daemon?
When transferring files between local and remote by accessing via a
remote shell, does the remote host need to run rsync? If yes, does
the remote host run rsync as a server but not as a daemon, or just
as the local host runs rsync as a client?
When transferring files within the local host, does the local host
need to run a rsync client and a rsync server?
When listing the source files instead of copying, if the source is
in a remote host, does the remote host need to run rsync as a server
or daemon?
rsync -e ssh用来访问rsync远程主机上的(客户端),则可以触发远程客户端。(Q 6 中由远程 shell 生成的 rsync。)Which use cases does "Note that rsync must be installed on both the
source and destination machines" apply to, and not apply to,
respectively?
rsync二进制文件必须安装在两台机器上。在 SRC 和 DEST 是同一台机器的情况下,单独的 rsync 二进制文件基本上将扮演这两个角色。In the GENERAL part, "a server can be either a daemon or a
remote-shell spawned process". Does a remote host running rsync as a
server as "a remote-shell spawned process" mean that the remote host
runs rsync in the same way as the local host runs rsync?
rsync会话正在履行服务器角色。| 归档时间: |
|
| 查看次数: |
6459 次 |
| 最近记录: |