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 = rsyncgid = rsyncuse chroot = no max connections = 2000 =====>最大连接数timeout = 600pid file = /var/run/rsyncd.pidlock file = /var/run/rsync.locklog file = /var/log/rsyncd.logignore errorsread only = false ====》可读写list = false ====》不可远程列表hosts allow = 192.1.1.0/24hosts deny = 0.0.0.0/32 ====》不拒绝ip地址auth users = rsync_backupsecrets 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 = rsyncgid = rsyncuse chroot = nomax connections = 2000timeout = 600pid file = /var/run/rsyncd.pidlock file = /var/run/rsync.locklog file = /var/log/rsyncd.logignore errorsread only = falselist = falsehosts allow = 192.1.1.0/24hosts deny = 0.0.0.0/32auth users = rsync_backupsecrets file = /etc/rsync.password#####################################[backup]comment = www by lufengpath = /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.passwordrsync_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推送备份rsyncpush:[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 ...
随机推荐
- Java:双向链表反转实现
有个小需求要求实现一个双向链表的反转于是就有了下边代码: 链表元素结构定义: package com.util; public class LinkedNode<T>{ private T ...
- python命令行参数传递JSON串
有点小问题,一是传递的双引号被自动删除了,但是如果用单引号,JSON解析又不认. 所以,最后的方案是,传递单引号,但程序处理时做一个替换,替换成单引号.
- Authentication and Authorization in ASP.NET Web API
You've created a web API, but now you want to control access to it. In this series of articles, we ...
- form表单的reset
$(':input','#myform') .not(':button, :submit, :reset, :hidden') .val('') .removeAttr('checked') .rem ...
- mysql设置允许外网访问
1.设置mysql服务允许外网访问 修改mysql的配置文件,有的是my.ini,有的是my.cnf[linux],找到bind-address变量,这个值默认是127.0.0.1,设置为0.0.0. ...
- 获取sevlet response值
调用: PrintWriter out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "UTF-8 ...
- SpringBoot开发详解(六)-- 异常统一管理以及AOP的使用
https://blog.csdn.net/qq_31001665/article/details/71357825
- SpringBoot添加对Log4j2的支持
1.在添加对Log4j2的支持前,需要先把SpringBoot默认使用的Logback日志框架排除,修改pom.xml文件: <dependency> <groupId>org ...
- uni-app - 支付(app支付、小程序支付、h5(微信端)支付)
App支付.小程序支付.h5(微信端)支付 APP支付(内置) appPay.js /** * 5+App支付,仅支持支付宝以及微信支付 * * 支付宝Sdk集成,微信sdk未集成 * * @para ...
- Window10中创建目录连接点
使用命令: mklink /J "junction point name" "target directory" 如,我有一个文件夹在D:\aa,想存在相同的目 ...