Ubuntu使用rsync
程序员文章站
2022-06-12 21:26:33
...
默认情况Ubuntu安装了rsync服务,但在/etc下没有配置文件,一般情况可以copy示例文件到/etc下
#cp /usr/share/doc/rsync/examples/rsyncd.conf /etc
vi /etc/rsyncd.conf
log file=/var/log/rsyncd
[test]
read only = yes
timeout = 300
lock file = /var/lock/rsyncd
secrets file = /etc/rsyncd.pass
list=yes
max connections = 4
hosts allow=192.168.137.102
hosts deny=*
path =/install/test
vi /etc/rsyncd.pass
user:password
启动
rsync --daemon
验证
lsof -i:873
其他机器上执行同步
rsync -auqz password@192.168.137.101::test /install/test2
#cp /usr/share/doc/rsync/examples/rsyncd.conf /etc
vi /etc/rsyncd.conf
log file=/var/log/rsyncd
[test]
read only = yes
timeout = 300
lock file = /var/lock/rsyncd
secrets file = /etc/rsyncd.pass
list=yes
max connections = 4
hosts allow=192.168.137.102
hosts deny=*
path =/install/test
vi /etc/rsyncd.pass
user:password
启动
rsync --daemon
验证
lsof -i:873
其他机器上执行同步
rsync -auqz password@192.168.137.101::test /install/test2
上一篇: PowerMock应用二:模拟new对象
下一篇: virtualbox安装mac os