rsync linux文件同步配置
来源:互联网 发布:金阳光交易软件 编辑:程序博客网 时间:2024/04/26 20:59
【服务器端】
1、首先安装rsync 服务
yum install rsync
2、在etc下创建 rsyncd.conf 配置文件
vim /etc/rsyncd.conf
【模板】
secrets file = /etc/rsyncd.pass
motd file = /etc/rsyncd.motd
read only = yes
list = no
uid = root
gid = root
hosts allow = * #这里不限制哪个IP同步,也可以是 192.168.163.30
#max connections = 5
log file = /etc/rsyncd.log
#pid file = /var/run/rsyncd.pid
#lock file = /var/run/rsync.lock
ignore errors
slp refresh = 300
[web]
comment = web
path = /data/
auth users = root
3、在etc下创建 rsyncd.pass 密码文件
vim /etc/rsyncd.pass
【模板】
root:123456
4、给密码文件 600的权限
chmod 600 rsyncd.pass
5、防火墙添加873 端口用于同步
iptables -I INPUT -p tcp --dport 873 -j ACCEPT
service iptables save
service iptables restart
查看端口占用情况
[root@localhost test]# lsof -i:873
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
xinetd 2070 root 5u IPv6 11563 0t0 TCP *:rsync (LISTEN)
[root@localhost test]# kill -9 2070
[root@localhost test]# /usr/bin/rsync --daemon --port=873 --config=/etc/rsyncd.conf
[root@localhost test]# lsof -i:873
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rsync 31008 root 3u IPv4 1053416 0t0 TCP *:rsync (LISTEN)
rsync 31008 root 5u IPv6 1053417 0t0 TCP *:rsync (LISTEN)
/usr/bin/rsync --daemon --port=873 --config=/etc/rsyncd.conf
查看 rsync 服务目录 which rsync
【客户端】
直接运行语句
rsync -rvlHpogDtS --progress --delete root@192.168.163.128::web /data
0 0
- rsync linux文件同步配置
- rsync文件同步配置
- Rsync同步文件配置
- linux rsync 文件同步
- linux rsync同步文件
- 【Linux】rsync文件同步
- CentOS rsync文件同步配置
- rsync+inotify文件同步配置
- Linux下rsync文件同步服务器配置详解
- 【惊雷】Linux下Rsync的文件同步的配置过程
- Linux下rsync同步配置
- linux rsync服务器文件同步
- linux文件同步(rsync)
- Linux Rsync 远程文件同步
- Linux--rsync实现文件同步
- Linux rsync同步文件脚本
- Linux Rsync文件同步备份
- inotify+rsync安装配置,文件同步
- 海门代办医院诊断书
- Ubuntu虚拟机+ROS+Android开发环境配置笔记
- 高邮代办医院诊断书
- Date的常用工具类
- 仪征代办医院诊断书
- rsync linux文件同步配置
- 创建简单的Google地图
- 扬中代办医院诊断书
- jboss部署错误
- 简单的启动代码 IMPORT |Image$$RO$$Limit|
- 富阳代办医院诊断书
- 临安代办医院诊断书
- hdu5377 Root
- android中string.xml文件的用法