Rsync服务端部署流程

一、rsync服务端配置流程

1. 配置rsync配置文件/etc/rsyncd.conf

2.  创建同步的本地目录/dingjian 并根据需要授权

目录和/etc/rsync.password为配置文件中path = /dingjian/参数的配置

3.  账号密码文件配置:

echo "rsync_backup:dingjian">/etc/rsync.password

chmod 600 /etc/rsync.password

提示:

1)/etc/rsync.password为配置文件中secrets file = /etc/rsync.password参数的配置

2)账号rsync_backup为/etc/rsync.password为配置文件中auth users = rsync_backup参数的配置\

4.  启动rsync服务

      [[email protected]]# rsync --daemon
      [[email protected] dingjian]# echo"/usr/bin/rsync --daemon">>/etc/rc.local
      [[email protected] dingjian]# cat/etc/rc.local |grep daemon
      [[email protected] dingjian]# ps-ef |grep rsync

重起

   [[email protected] dingjian]#pkill rsync
   [[email protected] dingjian]#rsync --daemon
   [[email protected] dingjian]# ps-ef |grep rsync

二、rsync客户端配置流程:

[[email protected] etc]# echo "dingjian">/etc/rsync.password
chmod 600 /etc/rsync.password

提示:

客户端的/etc/rsync.password和服务端的/etc/rsync.password没有任务关系,只要和客户端rsync命令接的参数—password-file=/etc/rsync.password中的路径对应即可

三、rsync客户端命令操作细节

推送整个目录

rsync-avz /tmp [email protected]::dingjian--password-file=/etc/rsync.password

只推送目录中的文件

rsync-avz /tmp/ [email protected]::dingjian--password-file=/etc/rsync.password

抓取rsync模块对应目录里的文件

rsync [email protected]::dingjian --password-file=/etc/rsync.password /tmp

时间: 2024-08-05 11:14:58

Rsync服务端部署流程的相关文章

Service系统服务(六):rsync基本用法、rsync+SSH同步、配置rsync服务端、访问rsync共享资源、使用inotifywait工具、配置Web镜像同步、配置并验证Split分离解析

一.rsync基本用法 目标: 本例要求掌握远程同步的基本操作,使用rsync命令完成下列任务: 1> 将目录 /boot 同步到目录 /todir 下   2> 将目录 /boot 下的文档同步到目录 /todir 下   3> 在目录 /boot 下新增文件 a.txt,删除 /todir 下的子目录 grub2,再次同步使 /todir 与 /boot 一致   4> 验证 -a.-n.-v.--delete 选项的含义 方案: 本地同步操作: rsync [选项...] 本

rsync服务的部署配置

rsync服务的部署 一:服务端部署就是一个命令 一直在运行进程,守护进程,rsync --deamon 启动服务就是服务端 (1)检查软件是否存在rpm -qa|grep rsyncrsync-3.0.6-12.el6.x86_64如果rsync软件不存在yum install -y rsync (2)编写rsync软件的配置文件vim /etc/rsyncd.conf ---rsyncd.conf是rsync服务的默认配置文件,默认并不存在 #rsync_config#created by

rsync 服务及部署

1 rsync简介 1.1 什么是rsync rsync: - a fast, versatile, remote (and local) file-copying toolrsync:是一种快速,多功能,远程和本地文件拷贝的工具rsync --version:查看rsync软件版本备份服务重要性: ?企业中所有要进行操作的数据文件,一定操作前备份.?? 企业备份数据方法:重要数据需要保存在专门备份服务器上 ?第三方网盘存储. 1.2 rsync特点 可以实现全量和增量备份 1.2.1 全量和增

rsync服务端排错思路

rsync服务端排错思路 查看rsync服务配置文件路径是否正确,正确的默认路径为/etc/rsyncd.conf 查看配置文件里host allow,host deny,允许的ip网段是否是允许客户端访问的ip网段 查看配置文件中path参数里的路径是否存在,权限是否正确(正常应为配置文件中的UID参数对应的属主和组) 查看rsync服务是否启动,查看命令为:ps -ef|grep rsync.端口是否存在netstat -lnt|grep 873 查看iptables防火墙和selinux是

CentOS Rsync服务端与Windows cwRsync客户端实现数据同步

CentOS Rsync服务端与Windows cwRsync客户端实现数据同步 2012年05月06日 ? Rsync ? 暂无评论 ? 被围观 3,622次+ 说明: 1.Rsync服务端 系统:CentOS 5.5 IP地址:192.168.21.160 数据存放目录:/data/osyunwei 2.cwRsync客户端 系统:Windows Server 2003 IP地址:192.168.21.130 同步的目录:D:\osyunwei 实现目的: cwRsync客户端每天凌晨3:0

react+redux教程(六)redux服务端渲染流程

教程目录 react+redux教程(一)connect.applyMiddleware.thunk.webpackHotMiddleware react+redux教程(二)redux的单一状态树完全替代了react的状态机? react+redux教程(三)reduce().filter().map().some().every()....展开属性 react+redux教程(四)undo.devtools.router react+redux教程(五)异步.单一state树结构.compo

Maven服务端部署

Maven服务端部署 更改/bin/jsw/conf/wrapper.conf,设置wrapper.java.commond=D:\Program Files\Java\jdk1.8.0_40\bin\java.exe 否则,服务安装后无法启动 ? 安装 在CMD下找到nexus.bat,执行nexus.bat start即可. Http://localhost:8081/nexus,若能打开,说明服务安装成功 如果要更改端口号,可以conf/nexus.properties中更改 ? 默认有两

rsync 服务快速部署手册

一.rsync服务端安装 1.查看rsync安装包 # rpm -qa rsync rsync-3.0.6-12.el6.x86_64 2.安装rsync 系统默认都会安装rsync软件包的,如果查看发现没有安装,执行yum安装即可 # yum install rsync -y 3.添加rsync服务的用户,管理本地目录的 # useradd -s /sbin/nologin -M rsync # id rsync 4.生成rsyncd.conf配置文件 # cat /etc/rsyncd.co

rsync服务端和客户端配置自动化配置脚本

系统版本CentOS release 6.9 (Final)2.6.32-696.el6.x86_64 x86_64 rsync 服务端IP:172.16.1.41 计算机名:backuprsync客户端IP:172.16.1.31 计算机名:nfs 服务器配置: [[email protected] scripts]# cat backup_server.sh #!/bin/bash export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/