command:rsync -vzrtopg --progress --delete --exclude=*.txt rsync@192.168.1.9::test /cygdrive/f/a
服务器端rsyncd.conf实例: 服务器端软件下载地址http://www.jb51.net/softs/16780.html
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.pas但上面的secrets file = rsync.pas即可
客户端软件http://www.jb51.net/softs/16779.html 客户端使用备份命令:
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,批处理,再添加到系统的计划任务执行。