rsync服务器和客户端问题

rsync服务器和客户端问题

我刚刚配置了一个 rsync 服务器,该服务器托管我想要复制到远程计算机的文件。这是 rsyncd.conf 文件:

max connections = 2
log file = /var/log/rsync.log
timeout = 300

[share]
comment = share
path = /mnt/share
read only = no
list = yes
uid = root
gid = root
auth users = rsync
secrets file = /etc/rsyncd.secrets

我创建一个 rsyncd.secrets 文件,如下所示:

rsync:password

启动 rsync 守护进程后,我在远程计算机上发出以下命令,并看到该模块

[remoteserver] # rsync  rsync://10.0.0.10
share  share

通过以下设置,我需要在远程服务器(或 rsync 服务器?)上发出什么命令才能将“share”同步到本地“/tmp/share”。

会是这样的吗?

rsync -rv rsync://[email protected]::share /tmp/share

答案1

语法几乎是正确的,rsync 服务器 URL 的格式应该类似于host_or_ip::share_name.

相关内容