首页 > 其他 > 详细

rsync异机备份

时间:2015-08-31 23:26:41      阅读:260      评论:0      收藏:0      [点我收藏+]

1、服务器

新建/etc/rsyncd.conf  ->新建/etc/rsyncd.secrets ->运行rsync --daemon或修改/etc/xinetd.d/rsync(修改后,须执行service xinetd restart)

vi /etc/rsyncd.conf

  

# Distributed under the terms of the GNU General Public License v2
# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help

# This line is required by the /etc/init.d/rsyncd script
port = 873
address = 192.168.0.106
uid = root
gid = root

use chroot = no
read only = yes

#limit access to private LANs
hosts allow=192.168.0.109
hosts deny=*
max connections = 5

#This will give you a separate log file
log file = /var/log/rsync.log

[test]
#指定文件目录所在位置,这是必须指定的 
path = /root/test
list=yes
ignore errors
#认证用户必须在服务器上存在的用户
auth users = root
#含有上行的用户
secrets file = /etc/rsyncd.secrets
comment = This is test data
#exclude = exclude file or dir
vi /etc/rsyncd.secrets
root:pwd

2、客户端

首先:我们看看rsync服务器上提供了哪些可用的数据源

rsync  --list-only  root@192.168.145.5::

然后:同步数据

rsync -avzP root@192.168.145.5::test test

 

rsync异机备份

原文:http://www.cnblogs.com/windyWu/p/4774293.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!