前言
上篇博客,小编写到了rsync的四种模式中的三种,这篇博客主要写最后一种,服务器模式
服务器模式简介
这种模式是基于C/S模式的,在这种模式下,rsync在后台启用了一个守护进程,这个守护进程在rsync服务端永久运行,用于接受文件传输请求,因此,客户端既可以把文件发送给守护进程,也可以向守护进程请求文件,rsync的服务器模式非常适合作为异地的中心备份服务器或数据异地存储库来使用。
搭建服务器模式
1、准备条件
两台Linux系统虚拟机(A系统IP为192.168.17.33;B系统IP为192.168.17.34)
2、安装rsync
yum -y install rsync
启动rsync服务
rsync --daemon
3、修改A系统rsync配置文件
uid = nobody
gid = nobody
use chroot = no
max connections = 10
strict modes =yes
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
[jtmodel]
path = /usr/svn/backup
comment=ixdba file
ignore errors
read only =no
write only =no
host allow =*
hosts deny=192/168.17.33
list=false
uid =root
gid=root
authz users=backup
secrets file = /etc/server.password

本文介绍了如何在Linux环境中使用rsync搭建服务器模式进行文件备份。通过详细步骤,包括安装rsync、配置服务器和客户端,以及设置定时备份策略,确保实现安全、高效的异地备份。
&spm=1001.2101.3001.5002&articleId=79187131&d=1&t=3&u=186dfcdc8d724e9e9b78c2b53a6df800)
448

被折叠的 条评论
为什么被折叠?



