ccafbackup.bat
@echo off
rem date format is "YYYY-MM-DD"
rem 格式化日期
set dt=%date:~0,10%
set dy=%dt:~0,4%
set dm=%dt:~5,2%
set dd=%dt:~8,2%
set dt=%dy%%dm%%dd%
mkdir k:\DAILYBACKUP\%dt%
isql -Usa -Psa -i d:\ccaf_backup.sql
move k:\CEFileStore.bak k:\DAILYBACKUP\%dt%\CEFileStore%dt%
move k:\CEFileStorelog.bak k:\DAILYBACKUP\%dt%\CEFileStore%dt%log
move k:\UAPSDB.bak k:\DAILYBACKUP\%dt%\UAPSDB%dt%
move k:\UAPSDBlog.bak k:\DAILYBACKUP\%dt%\UAPSDB%dt%log
move k:\VWdb.bak k:\DAILYBACKUP\%dt%\VWdb%dt%
move k:\VWdblog.bak k:\DAILYBACKUP\%dt%\VWdb%dt%log
move k:\master.bak k:\DAILYBACKUP\%dt%\master%dt%
ccaf_backup.sql
backup database CEFileStore to disk='k:\CEFileStore.bak' with name='CEFileStore 备份'
backup log CEFileStore to disk='k:\CEFileStorelog.bak' with name='CEFileStore 备份'
backup database UAPSDB to disk='k:\UAPSDB.bak' with name='UAPSDB 备份'
backup log UAPSDB to disk='k:\UAPSDBlog.bak' with name='UAPSDB 备份'
backup database VWdb to disk='k:\VWdb.bak' with name='VWdb 备份'
backup log VWdb to disk='k:\VWdblog.bak' with name='VWdb 备份'
backup database master to disk='k:\master.bak' with name='master 备份'
P8文件备份.bat
@echo off
REM last updated 10:00pm May 21,2001
cd d:\DAILYBACKUP
time /t >d:\DAILYBACKUP\x.tmp
for /f "tokens=1" %%a in (d:\DAILYBACKUP\x.tmp) do set t1=%%a
date /t >d:\DAILYBACKUP\x.tmp
for /f "tokens=1" %%a in (d:\DAILYBACKUP\x.tmp) do set d=%%a
rem for /f "tokens=2" %%a in (d:\DAILYBACKUP\x.tmp) do set d=%%a
echo ******************************************************************* >c:\p8%d%_backup.log
echo * P8 文件系统每日备份 ON %d% * >>c:\p8%d%_backup.log
echo ******************************************************************* >>c:\p8%d%_backup.log
echo 看完LOG文件后请退出Notepad. 谢谢. >>c:\p8%d%_backup.log
echo *******************************************************************
echo * P8 文件系统每日备份 ON %d% *
echo *******************************************************************
echo.
echo. >>c:\P8%d%_backup.log
echo.
echo.
echo. >>c:\P8%d%_backup.log
ntbackup backup u:\ v:\ w:\ x:\ Z:\data Z:\fax Z:\pbc Z:\report Z:\scan /a /d "Daily normal backup" /v:no /r:no /rs:no /hc:off /m normal /l:s /f "D:\DAILYBACKUP\%d%\Backup%d%.bkf"
echo -----------------------------------------------------
echo ----------------------------------------------------->>c:\p8%d%_backup.log