简单记录下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,批处理,再添加到系统的计划任务执行。

Powered by MightyAdsense














发表评论
字体为 粗体 是必填项目,邮箱地址 永远不会 公布。
允许部分 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 内容相关的,灌水、攻击性或不恰当的评论 可能 会被编辑或删除。