rsync使用

rsync使用

配置/etc/rsyncd.conf

		 
uid = 0 				#用root,比较危险
gid = nobody 
use chroot = no         # 不使用chroot
max connections = 4         # 最大连接数为4
pid file = /var/run/rsyncd.pid 
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log    # 日志记录文件

#[inburst]            # 这里是认证的模块名,在client端需要指定
#path = /home/inburst/python/    # 需要做镜像的目录
#comment = BACKUP CLIENT IS SOLARIS 8 E250 
#ignore errors            # 可以忽略一些无关的IO错误
#read only = yes            # 只读
#list = no            # 不允许列文件
#auth users = inburst        # 认证的用户名,如果没有这行,则表明是匿名
#secrets file = /etc/inburst.pas    # 认证文件名

[lsb]
path = /home/lsb
comment = lsb home

[cvs]
path = /u/cvsroot
comment = cvs rep

[freeradius]
path = /usr/freeradius
comment = freeradius 
		 
		 
用xinetd启动rsync。在另外一台机器中一些下面的backup.sh脚本就可以了
#! /bin/sh

rsync -vzrtopg --progress --delete 192.168.0.2::cvs /u/backup/cvsroot
rsync -vzrtopg --progress --delete 192.168.0.2::lsb /u/backup/lsb
rsync -vzrtopg --progress --delete 192.168.0.2::freeradius /u/backup/freeradius
		 
		 
最后加crontab,见 http://rsync.samba.org/

 

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值