Ubuntu使用rsync
程序员文章站
2022-06-12 21:05:50
...
默认情况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
上一篇: log4j指定一个类的日志输出到文件
下一篇: 网上遇到的面试题