Backing up WSS – automated script

Summary:
To fully backup a WSS or MOSS installation two main components need to be backed up individually, the IIS Metabase and the WSS content and configuration data. Command-line tools to complete both backups are provided by Microsoft.

Process:
Copy the following script into a batch file and schedule using Windows Task Scheduler:

@ECHO OFF

rem Script to backup the IIS Metabase and WSS databases

SET IIS_BACKUP_NAME=IISMetaBackup”
SET WSS_BACKUP_DEST=”D:TOPWSSBackups”

rem Delete previous backups
del %WSS_BACKUP_DEST%*.* /S /F /Q
rmdir %WSS_BACKUP_DEST%spbr0000 /S /Q

rem Backing up IIS Metabase
cscript C:WINDOWSSystem32iisback.vbs /backup /b %IIS_BACKUP_NAME%
move /Y C:WINDOWSsystem32inetsrvMetaBack%IIS_BACKUP_NAME%.* %WSS_BACKUP_DEST%

rem Backing up WSS Site collection
“C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BINSTSADM.EXE” -o backup -directory %WSS_BACKUP_DEST% -backupmethod full

Powered by www.itgroove.net

Sponsored by Major Change (.com) – The Online Change Register