Windows rsync服务器备份配置实例
(编辑:jimmy 日期: 2024/11/14 浏览:2)
command:rsync -vzrtopg --progress --delete --exclude=*.txt rsync@192.168.1.9::test /cygdrive/f/a
服务器端rsyncd.conf实例:
服务器端软件下载地址https://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即可
客户端软件https://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,批处理,再添加到系统的计划任务执行。