Rsync ,从linux 远程备份到 windows 笔记

测试centos5.2自带的rsync无法读取.conf配置文件,后来放弃自带的rsync,在以下地址下载源码编译安装

下载地址:http://mattmccutchen.net/rsync/packages.html ,目前最新版是3.04

 

解压编译
./configure --prefix=/usr/local/rsync
make
make install

新建一个rsyncd.conf配置文件
[root@localhost bin]# vi rsyncd.conf

nimal 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
pid file = /var/run/rsyncd.pid
port = 873
address = 192.168.139.77
#uid = nobody
#gid = nobody
uid = root
gid = root

use chroot = no
read only = yes


#limit access to private LANs
hosts allow=192.168.139.66
hosts deny=*

max connections = 5
motd file = /etc/rsyncd/rsyncd.motd

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

#This will log every file transferred - up to 85,000+ per user, per sync
#transfer logging = yes

log format = %t %a %m %f %b
syslog facility = local3
timeout = 300

[usr]
path = /usr
list=no
ignore errors
comment = usr
auth users = root
secrets file = /etc/rsyncd/rsyncd.secrets #注意这个文件只能设为600权限

再像这样启动rsync
[root@localhost bin]# rsync --daemon  --config=/usr/local/rsyncd/bin/rsyncd.conf

windows备份机上安装cwRsync
下载地址:http://www.softpedia.com/progDownload/cwRsync-Download-45383.html
安装好之后这样连接到linux获取文件,如果没有问题应该看到Password:字样的提示,

D:\Program Files\cwRsync\bin>rsync -vzrtopg --progress --delete root@192.168.139.77::usr  .\temp\

其中 temp 我是建在bin下,现在还不知道用什么方法把备份目录建到别的盘

参考:http://www.linuxsir.org/main/?q=node/256

转载于:https://www.cnblogs.com/LCX/archive/2008/10/09/1307464.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值