rsync配置及优化
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
daemon端配置: 创建配置文件 [root@Backup-server ~] # touch /etc/rsyncd.conf [root@Backup-server ~] # vi /etc/rsyncd.conf [root@Backup-server ~] # cat /etc/rsyncd.conf #rsync server #created by lufeng@3.15 ##rsyncd.conf start## uid = rsync gid = rsync use chroot = no max connections = 2000 =====>最大连接数 timeout = 600 pid file = /var/run/rsyncd .pid lock file = /var/run/rsync .lock log file = /var/log/rsyncd .log ignore errors read only = false ====》可读写 list = false ====》不可远程列表 hosts allow = 192.1.1.0 /24 hosts deny = 0.0.0.0 /32 ====》不拒绝ip地址 auth users = rsync_backup secrets file = /etc/rsync .password ====》存放用户和密码的文件 ##################################### [backup] ====》共享模块 comment = Backup server by lufeng 3.15 =====》注释 path = /backup ====》共享目录 可粘贴部分 #rsync server #created by lufeng@3.15 ##rsyncd.conf start## uid = rsync gid = rsync use chroot = no max connections = 2000 timeout = 600 pid file = /var/run/rsyncd .pid lock file = /var/run/rsync .lock log file = /var/log/rsyncd .log ignore errors read only = false list = false hosts allow = 192.1.1.0 /24 hosts deny = 0.0.0.0 /32 auth users = rsync_backup secrets file = /etc/rsync .password ##################################### [backup] comment = www by lufeng path = /backup 创建用户及共享目录 [root@Backup-server ~] # useradd rsync -s /sbin/nologin -M [root@Backup-server ~] # mkdir /backup [root@Backup-server ~] # chown -R rsync /backup/ 创建密码文件 [root@Backup-server ~] # echo "rsync_backup:199429" >/etc/rsync.password [root@Backup-server ~] # cat /etc/rsync.password rsync_backup:199429 [root@Backup-server ~] # chmod 600 /etc/rsync.password 启动 rsync 及查看端口 [root@Backup-server ~] # rsync --daemon [root@Backup-server ~] # ps -ef|grep rsync|grep -v grep [root@Backup-server ~] # netstat -lntup|grep rsync [root@Backup-server ~] # lsof -i :873 设置开机启动 [root@Backup-server ~] # echo "rsync --deamon" >>/etc/rc.local [root@Backup-server ~] # cat /etc/rc.local 客户端配置: 创建密码文件 [root@lnmp01 ~] # echo "199429" >/etc/rsync.password [root@lnmp01 ~] # chmod 600 /etc/rsync.password [root@lnmp01 ~] # cat /etc/rsync.password 199429 推送备份 rsync push: [root@lnmp01 ~] # rsync -avz /tmp/ rsync_backup@192.1.1.7::backup --password-file=/etc/rsync.password 增量备份成功,结合定时任务实现定时备份。 |
本文出自 “大梦初醒” 博客,请务必保留此出处http://bestlufeng.blog.51cto.com/11790256/1907052
rsync配置及优化的更多相关文章
- Linux的rsync 配置,用于服务器之间远程传大量的数据
[教程主题]:rsync [课程录制]: 创E [主要内容] [1] rsync介绍 Rsync(Remote Synchronize) 是一个远程资料同步工具,可通过LAN/WAN快速同步多台主机, ...
- Linux rsync配置用于服务器之间传输大量的数据
Linux的rsync 配置,用于服务器之间远程传大量的数据 [教程主题]:rsync [课程录制]: 创E [主要内容] [1] rsync介绍 Rsync(Remote Synchronize ...
- 实战Nginx与PHP(FastCGI)的安装、配置与优化
一.什么是 FastCGIFastCGI是一个可伸缩地.高速地在HTTP server和动态脚本语言间通信的接口.多数流行的HTTP server都支持FastCGI,包括Apache.Nginx和l ...
- nginx反向代理配置及优化
nginx反向代理配置及优化前言: 由于服务器apache抗不住目前的并发.加上前端squid配置后,问题依然无法解决.而页面程序大部分是动态.无法使用fastcgi来处理.因此想使用nginx做为反 ...
- 【转】实战Nginx与PHP(FastCGI)的安装、配置与优化
原文连接:http://ixdba.blog.51cto.com/2895551/806622 原文作者:南非蚂蚁 转载注明以上信息 一.什么是 FastCGIFastCGI是一个可伸缩地.高速地在H ...
- Nginx与Tomcat安装、配置与优化
Nginx与Tomcat安装.配置与优化 Nginx与Tomcat安装.配置与优化 Nginx的安装与使用 Nginx是一款优秀的反向代理服务器 安装: rpm(或者是pkg安装),是预编译好的程序包 ...
- Nginx配置性能优化与压力测试webbench【转】
这一篇我们来说Nginx配置性能优化与压力测试webbench. 基本的 (优化过的)配置 我们将修改的唯一文件是nginx.conf,其中包含Nginx不同模块的所有设置.你应该能够在服务器的/et ...
- 大型网站的 HTTPS 实践(三)——基于协议和配置的优化
详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt389 1 前言 上文讲到 HTTPS 对用户访问速度的影响. 本文就为大家介 ...
- lsyncd+rsync配置图片资源双向同步
需求:为保证国内外图片加载速度,国内请求上传图片资源地址阿里云oss,国外请求上传图片资源地址aws s3,为保证图片资源的一致性,需定时进行oss和s3图片双向同步 调研方案:由于之前配置过inot ...
随机推荐
- Android -- Handling back button press Inside Fragments
干货(1) 首先创建一个抽象类BackHandledFragment,该类有一个抽象方法onBackPressed(),所有BackHandledFragment的子类在onBackPressed方法 ...
- Graph 卷积神经网络:概述、样例及最新进展
http://www.52ml.net/20031.html [新智元导读]Graph Convolutional Network(GCN)是直接作用于图的卷积神经网络,GCN 允许对结构化数据进行端 ...
- [Spring boot] Read values from external properties file
Let's say we have a extral app.proporites file which contains some extra configuration: // resources ...
- [Canvas]游戏增加怪物爆炸效果,改善箭头形状
请点此下载代码并用浏览器打开试玩. 图例: 代码: <!DOCTYPE html> <html lang="utf-8"> <meta http-eq ...
- Perl、PHP、Python、Java 和 Ruby 比较【转载+整理】
从本文的内容上,写的时间比较早,而且有些术语我认为也不太准,有点口语化,但是意思到了. 问题: Perl.Python.Ruby 和 PHP 各自有何特点? 为什么动态语言多作为轻量级的解决方案? L ...
- fortune 计算公式
fortune 计算PV值. 举例:一笔 120.00的债权; 12天还完,3.15号借款,3.16开始还款.等额本息还款计算出每天还款: 10.22 根据 现值计算公式 PV = CFn/(1+r) ...
- Mybatis 自定义SqlSessionFactoryBean扫描通配符typeAliasesPackage
typeAliasesPackage 默认只能扫描某一个路径下,或以逗号等分割的 几个路径下的内容,不支持通配符和正则,采用重写的方式解决 package com.xxxx.xxx.util.comm ...
- WPF 之 创建继承自Window 基类的自定义窗口基类
开发项目时,按照美工的设计其外边框(包括最大化,最小化,关闭等按钮)自然不同于 Window 自身的,但窗口的外边框及窗口移动.最小化等标题栏操作基本都是一样的.所以通过查看资料,可按如下方法创建继承 ...
- JERSEY中文翻译(第一章、Getting Started、1.1.7)
最近发现jersey特别流行,但是中文资料非常少,深感没有资料的痛苦,所以分享一下看到的内容供他人快速入门. 今天翻译第一章.Getting Started.https://jersey.java.n ...
- SpringBoot使用Mybatis注解进行一对多和多对多查询(2)
SpringBoot使用Mybatis注解进行一对多和多对多查询 GitHub的完整示例项目地址kingboy-springboot-data 一.模拟的业务查询 系统中的用户user都有唯一对应的地 ...