04
7

Windows下通过验证备份rsync实例(日记)

简单记录下Rsync实例

command:rsync -vzrtopg –progress –delete –exclude=*.txt rsync@192.168.1.9::test /cygdrive/f/a

服务器端rsyncd.conf实例:
use chroot = no
#strict modes = false
hosts allow = *
log file = rsyncd.log
pid file = rsyncd.pid
uid=administrator
gid=administrator
max connections=4
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[test]
path = /cygdrive/j/byq/pdf
ignore errors
read only = yes
auth users=rsync
transfer logging = yes
secrets file = /cygdrive/c/rsync.pas

服务器端c:\rsync.pas实例:
rsync:12345

客户端使用备份命令:
rsync -vzrtopg –progress –delete –exclude=*.tmp rsync@192.168.1.9::test /cygdrive/f/a
备份时应注意–delete选项,依目标而定

客户端bat文件实例:
@echo off
title fileserver mirror backup……
rsync -vzrtopg –progress –delete –exclude=*.tmp rsync@192.168.1.9::test /cygdrive/f/a

最后备份时可将客户端命令写成bat,批处理,再添加到系统的计划任务执行。

17fav 收藏本文

Powered by

没有评论

第一个在本文留言。

发表评论

名字(必须)
邮箱(不会被公布)(必须)
网址

字体为 粗体 是必填项目,邮箱地址 永远不会 公布。

允许部分 HTML 代码:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs(网站链接)必须完整有效 (比如: http://www.23day.com),所有标签都必须完整的关闭。

超出部分系统将会自动分段及换行。

请保证评论内容是与日志或 Blog 内容相关的,灌水、攻击性或不恰当的评论 可能 会被编辑或删除。

    标签云

    Related links

    随机日志

    最新文章

    最新评论

    我的分享

 

收藏 & 分享

  • 百度搜藏
  • QQ 书签
  • Google 书签
  • 雅虎收藏
  • mister-wong.cn
  • 饭否
  • Facebook
  • del.icio.us

Powered by 17fav.com