本文共 970 字,大约阅读时间需要 3 分钟。
rem Version:backup_was V1.0,had tested on windows 2003
rem FUNTION:use rar compress the D:\ErpDataLog& D:\images
rem IP:10.8.252.23, <ErpDataLog&images>
set
PATH=%PATH%;D:\tomcat_bacth
set
BACKUP=D:\backup\Server3
set
ErpDataLog_images_WAR=D:\ErpDataLog&D:\images
set
FILE_DATE=%
date
:~0,4%%
date
:~5,2%%
date
:~8,2%
rar a -m5 %BACKUP%\images%FILE_DATE%.rar D:\web\images
rar a -m5 %BACKUP%\online%FILE_DATE%.rar D:\web\online
rar a -m5 %BACKUP%\wwwroot%FILE_DATE%.rar C:\inetpub\wwwroot
copy *%FILE_DATE%*.rar \\10.8.252.251\Server3\
forfiles
/p
D:\backup\Server3
/m
*.log -d -7
/c
"cmd /c del /f @path"
forfiles
/p
D:\backup\Server3
/m
*.rar -d -7
/c
"cmd /c del /f @path"
echo
local_batch.bat OK,storage_backup.bat begin.
转载于:https://blog.51cto.com/wangxiaoke/2176137