自动备份多个MOSS站点集的脚本
自动备份多个站点集的脚本(backupscript.bat)可以生成文件名如"Site80_20140327.bak"的备份文件。
@echo off
echo ++++++++++++++++++++++++++++++++++++++++++++
echo Backup of MOSS site!
echo Written by WangWei(yanjuancanyang@163.com)
echo ++++++++++++++++++++++++++++++++++++++++++++
set yyyy=%Date:~0,4%
set mm=%Date:~5,2%
set dd=%Date:~8,2%
set DateStamp=%yyyy%%mm%%dd%
Set BackupFileName1=Site80_
Set BackupFileName2=Site90_
Set SiteUrl1=http://test001
Set SiteUrl2=http://test001:90
C:
CD \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
stsadm.exe -o backup -url %SiteUrl1% -filename F:\PortalBackup\%BackupFileName1%%DateStamp%.bak -overwrite
stsadm.exe -o backup -url %SiteUrl2% -filename F:\PortalBackup\%BackupFileName2%%DateStamp%.bak -overwrite
echo Backup Operation completed. Please read above for any possible errors.
Pause
@echo off
echo ++++++++++++++++++++++++++++++++++++++++++++
echo Backup of MOSS site!
echo Written by WangWei(yanjuancanyang@163.com)
echo ++++++++++++++++++++++++++++++++++++++++++++
set yyyy=%Date:~0,4%
set mm=%Date:~5,2%
set dd=%Date:~8,2%
set DateStamp=%yyyy%%mm%%dd%
Set BackupFileName1=Site80_
Set BackupFileName2=Site90_
Set SiteUrl1=http://test001
Set SiteUrl2=http://test001:90
C:
CD \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
stsadm.exe -o backup -url %SiteUrl1% -filename F:\PortalBackup\%BackupFileName1%%DateStamp%.bak -overwrite
stsadm.exe -o backup -url %SiteUrl2% -filename F:\PortalBackup\%BackupFileName2%%DateStamp%.bak -overwrite
echo Backup Operation completed. Please read above for any possible errors.
Pause