标签:界面 命令行界面 rsync 脚本 ignore ict errors host ESS
下载cwRsyncServer软件安装(这是Windows下的文件同步软件)
use chroot = false
strict modes = false
hosts allow =*
log file = rsyncd.log
pid file = rsyncd.pid
port = 873
uid = 0
gid = 0
max connections = 10
lock file = rsyncd.lock
[backup]
path = /cygdrive/c/ztb/
transfer logging = yes
ignore errors
list = no
secrets file =/cygdrive/c/Rsync/rsyncd.secrets
hosts allow = 192.168.0.2/255.255.255.0
hosts deny = *
(2)建立rsyncd.secrets
直接输入:
123456
Administrator:123456
在命令行界面(cmd)进入软件安装目录C:\Program Files (x86)\ICW\bin;输入命令
rsync.exe -avzPu--progress --delete rsync://192.168.0.2:873/backup /cygdrive/c/Appbackup--password-file=/cygdrive/c/Rsync/rsyncd.secrets
在备份文件服务器(数据库服务器)新建文件同步脚本rsync.cmd,内容如下:
@echo off
set rsynclog="C:\Rsync\rsync.log"
set nowtime=te:~0,10% %time%
echo %nowtime% >> %rsynclog%
cd /d
C:\Program Files (x86)\ICW\bin
rsync.exe -avzPu --progress --delete rsync://192.168.0.2:873/backup/cygdrive/c/Appbackup --password-file=/cygdrive/c/Rsync/rsyncd.secrets
>> %rsynclog%
@echo -------------------------------------------------- >>%rsynclog%
@echo. >> %rsynclog%
点击任务计划程序,进入右键点击【创建任务】
创建定时任务和数据库差不多,可以参看另一篇博文
https://www.cnblogs.com/marshu/p/9842697.html
有梦可以跑回去,那自然是幸运!
标签:界面 命令行界面 rsync 脚本 ignore ict errors host ESS
原文地址:https://www.cnblogs.com/marshu/p/9842519.html