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,批處理,再添加到系統的計劃任務執行。