[Linux] 搭建rsync服务端
rsync是unix/linux下同步文件的一个高效算法,它能同步更新两处计算机的文件与目录,并适当利用查找文件中的不同块以减少数据传输。
Linux守护进程的运行方式:
1.独立运行(stand-alone)的守护进程,独立运行的守护进程由init脚本负责管理
2.xinetd模式运行独立的守护进程
配置rsync服务端:/etc/rsyncd.conf主配置配件(默认不存在)
uid = root
gid = root
max connections = 4
read only = true
hosts allow = *
transfer logging = true
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
[data0]
path = /data0 //注意这里的目录
comment = test
read only = false
list = false
auth users = shihan1 //注意这里的用户名
secrets file = /etc/rsyncd.pas //用户名密码文件
vim /etc/rsync.pas 配置密码 , 远程rsync服务器的帐户密码文件的权限必须为600
chmod 600 /etc/rsync.pas
shihan1:12341234
运行rsync --daemon
往主机推数据:
rsync -avzP --delete /mnt/public/phpdev/187_test/2018-12-awk-uniq.txt shihan1@服务器ip::data0/

从主机拉数据:
rsync -avzP shihan1@服务器ip::data0/* .
[Linux] 搭建rsync服务端的更多相关文章
- Centos6.9 搭建rsync服务端与客户端 案例:全网备份项目
rsync的企业工作场景说明 1)定时备份 1.1生产场景集群架构服务器备份方案项目 借助cron+rsync把所有客户服务器数据同步到备份服务器 2)实时复制 本地数据传输模式(local-only ...
- 最全Linux搭建SVN服务端教程
文章首推 支付宝接口对接 高德地图调用 验证码登录 QQ邮箱登录 今日主题:Linux搭建SVN服务端 简介 相信程序员对SVN还是不陌生的,虽然现在用Git比较多,但是SVN也是用的,SVN可以做代 ...
- Linux搭建rsync服务
一.Rsync的简单介绍 Rsync是一款开源的.快速的.多功能的.可实现全量及增量(全量备份是指全部备份,增量备份是在上一次备份的基础上只备份更新的内容)的本地货远程数据同步备份的优秀工具.Rsyn ...
- linux 搭建SVN服务端
搞了个服务器,然后现在想搞点事情,于是乎整个SVN在上面,算是熟悉下svn的操作过程 以下内容转载自: https://yq.aliyun.com/articles/6693 ------------ ...
- Linux搭建git服务端
1.安装$ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel$ yum inst ...
- 《用OpenResty搭建高性能服务端》笔记
概要 <用OpenResty搭建高性能服务端>是OpenResty系列课程中的入门课程,主讲人:温铭老师.课程分为10个章节,侧重于OpenResty的基本概念和主要特点的介绍,包括它的指 ...
- CentOS7下rsync服务端与Windows下cwRsync客户端实现数据同步配置方法
最近需求想定期备份服务器d盘的数据到Linux服务器上面,做个笔记顺便写下遇到的问题 以前整过一个win下的cwrsync(客户端)+rsync(服务端:存储)的bat脚本 和整过一个Linux下的r ...
- OpenResty搭建高性能服务端
OpenResty搭建高性能服务端 Socket编程 Linux Socket编程领域为了处理大量连接请求场景,需要使用非阻塞I/O和复用,select.poll.epoll是Linux API提 ...
- contos7搭建syslog服务端与客户端
搭建中心服务端1,编辑文件/etc/rsyslog.conf,找到以下内容,将前面的#注释符合去除#$ModLoad imtcp#$InputTCPServerRun 514 2,在/etc/rsys ...
随机推荐
- layui select使用问题
1.需要引用form模板 layui.use(['form'], function () { var form = layui.form; }); 2.html代码 <div class=&qu ...
- MySql解除安全模式:Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
在修改一条数据字段时报错: Error Code: 1175. You are using safe update mode and you tried to update a table witho ...
- oracle11G 用户密码180天修改概要文件过程
oracle11G 用户密码180天修改概要文件过程 原因 创建用户的时候不指定概要文件的默认的概要文件是default, 而默认的概要文件中的设置如下,注意斜体部分 PROFILE RESOURCE ...
- Eclipse显示行号
Windows->preference->General->Editors->Text Editors->Show line numbers
- [Swift]LeetCode152. 乘积最大子序列 | Maximum Product Subarray
Given an integer array nums, find the contiguous subarray within an array (containing at least one n ...
- [Swift]LeetCode645. 错误的集合 | Set Mismatch
The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of ...
- [Swift]LeetCode871. 最低加油次数 | Minimum Number of Refueling Stops
A car travels from a starting position to a destination which is target miles east of the starting p ...
- [Swift]LeetCode937. 重新排列日志文件 | Reorder Log Files
You have an array of logs. Each log is a space delimited string of words. For each log, the first w ...
- dataframe去除null、NaN和空字符串
去除null.NaN 去除 dataframe 中的 null . NaN 有方法 drop ,用 dataframe.na 找出带有 null. NaN 的行,用 drop 删除行: import ...
- 2.Django路由规则
路由规则 1.基于正则的url 在templates目录下创建index.html.detail.html文件 (1)index.html <!DOCTYPE html> <html ...