centos7安装rsync及两台机器进行文件同步
安装及配置
yum -y install rsync
#启动rsync服务
systemctl start rsyncd.service
systemctl enable rsyncd.service #检查是否已经成功启动
netstat -lnp|grep 873

服务端配置

# /etc/rsyncd: configuration file for rsync daemon mode # See rsyncd.conf man page for more options. # configuration example: uid = root
gid = root
port = 873
use chroot = no
# read only = no
# list = no
max connections = 4
# pid file = /var/run/rsyncd.pid
exclude = lost+found/
transfer logging = yes
timeout = 900
motd file = /etc/rsyncd/rsyncd.motd
log file = /var/log/rsyncd.log
lock file = /var/run/rsyncd.lock
ignore nonreadable = yes
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2 [simba]
path = /root/************/
comment=simba
ignore errors
read only = no
write only = no
list = no
auth users = root
secrets file = /etc/rsyncd.pass
hosts allow = *

给rsync定义身份,如下:
echo 'root:123456'>/etc/rsyncd.passwd //文件用户名和路径为上面定义,别写错,密码自己定
chmod 600 /etc/rsyncd.passwd //修改权限
重启服务
systemctl restart rsyncd.service
客户端配置
创建密码
echo '' >>/etc/rsyncd-test.passwd //注意这里只需要服务器rsyncd.passwd 中的密码
chmod 600 /etc/rsyncd-test.passwd
同步
rsync -auv --password-file=/etc/rsyncd-test.passwd /root/*********/ root@120.x.x.x::simba
centos7安装rsync及两台机器进行文件同步的更多相关文章
- 两台Linux服务器文件同步
在给公司或者学校做系统部署的时候,为了数据安全往往我们至少需要两台服务器,接下来请看: 我们要实现的是把客户端(192.168.0.1)的复制到目标服务器(192.168.0.2) 一.目标服务器 1 ...
- ROS知识(11)----同步两台机器时钟
两台机器同时运行过程中,对于ROS的tf变换,其要求两台机器的时钟要保持一致. 1.查询时间 首先通过以下命令,看两台机器时钟是否有差异.在本机上,查看远程master的机器时间: ntpdate - ...
- rsync配置两台服务器之间的文件备份(同步)
rsync配置两台服务器之间的文件备份(同步) 前情提要 环境: 192.168.1.2 主服务器 centos 7.7 192.168.1.3 备份服务器 centos 7.7 rsync 安装(两 ...
- Linux下 两台机器文件/文件夹 相互拷贝
Linux下 两台机器文件/文件夹 相互拷贝 设有两台机器 :A:*.101及 B:*.102. 把A下的.temp/var/a.txt拷贝到B机器的/text/目录下: 进入B机器:scp root ...
- [synergy]两台机器公用键盘鼠标
两台机器公用键盘鼠标 如果是Linux: 下载synergy相关的deb包,然后
- linu SSH 不在同一网段的两台机器如何通过ssh通信,SSH限制特定网段登陆的方法
1. linu SSH 不在同一网段的两台机器如何通过ssh通信 https://blog.csdn.net/lhf19891003/article/details/39895763 https:// ...
- keepalived两台机器同时出现vip问题
配置文件: 主:192.168.1.14 ! Configuration File for keepalived global_defs { script_user root enable_scrip ...
- OGG实现两台Oracle数据库的同步
今天通过最简单的一个例子,给大家讲解下 goldengate 实现两台Oracle数据库的同步.内容如下:1.配置数据库信息.2.安装golden gate.3.配置golden gate.4.测试同 ...
- 两台Mysql数据库数据同步实现
两台Mysql数据库数据同步实现 做开发的时候要做Mysql的数据库同步,两台安装一样的系统,都是FreeBSD5.4,安装了Apache 2.0.55和PHP 4.4.0,Mysql的版本是4.1. ...
随机推荐
- 【Android Studio】Gradle
Plugin version Required Gradle version 1.0.0 - 1.1.3 2.2.1 - 2.3 1.2.0 - 1.3.1 2.2.1 - 2.9 1.5.0 2.2 ...
- java5-11各个版本新特性
转载:https://blog.csdn.net/zl1zl2zl3/article/details/85055948 Java 5 Java5开发代号为Tiger(老虎),于2004-09-30发行 ...
- Angular、React、Vue是什么?
基于js语言的UI(组件)管理库 +数据+交互+组织 相当于iOS的uikit(UIView)
- Squeeze Excitation Module 对网络的改进分析
Squeeze-and-Excitation Networks SE-net 来自于Momenta 孙刚团队 SE的设计思路: 从卷积操作的实际作用来考虑,conv 把局部空间信息和通道信息组合起来, ...
- Codeforces Round #603 (Div. 2) A. Sweet Problem(数学)
链接: https://codeforces.com/contest/1263/problem/A 题意: You have three piles of candies: red, green an ...
- vue基于页面中按钮权限控制
main.js // 权限 /** 权限指令,对按钮权限的控制 **/ Vue.directive('allow', { bind: function(el, binding) { // 通过当前按钮 ...
- A`>G?~C009
A`>G?~C009 这场怎么才5题...看完猫的提交记录以为猫猫没写这场F A Multiple Array 直接做 B Tournament 直接树d C Division into Two ...
- FDQuery Out of memory
4万行记录 FDQuery查询 Out of memory sql server 可以查询成功 First chance exception at $7505D722. Exception class ...
- Linux禁止ping和开启ping的方法
Linux默认是允许Ping响应的,系统是否允许Ping由2个因素决定的:A.内核参数,B.防火墙,需要2个因素同时允许才能允许Ping,2个因素有任意一个禁Ping就无法Ping. 一.通过修改 ...
- 云服务器搭建JDK+Tomcat+MySQL环境
一.首先租赁一台云服务器(阿里云服务器或者腾讯云服务器) 其实可以在windows电脑上使用VMware workstation来安装虚拟机进行操作,毕竟云服务器低配也是很贵的.不过可以使用学生价去租 ...