Backing Up SharePoint

I think I’ve posted about this before, but it seems that every client I have asks me about how best to do backups with SharePoint.  If you are just backing up the server, you have almost zero (repeat: ZERO) chance of restoring after a problem.

Keep in mind that a backup strategy only works if you regularly test things by restoring your backup into a new environment. If your backups are no good, then you might as well not do them!

Here’s a backup script that you can schedule.  Many people also run a SQL backup, but the STSADM backup of the Site Collection is the fastest way I know of back from disaster.  This is simply a Windows batch file which you can schedule and expand upon, as needed.  Change the ‘Set variables here’ section to reflect your environment.

@echo off
echo ===========================================
echo Backup Script For Microsoft Office SharePoint Server 2007 (MOSS)
echo   or Windows SharePoint Services 2007 (WSS)
echo ===========================================

REM Set variables here
set SharePointServer=http://spvm
set BackupLocation=c:backupsharepointbackupsharepoint.dat
set CopyLocation=Z:temp
REM Done setting variables

echo Backing up %SharePointServer% to %BackupLocation%
"C:program filescommon filesmicrosoft sharedweb server extensions12binstsadm.exe" -o backup -url %SharePointServer% -filename %BackupLocation% -overwrite

echo Copying backup file from %BackupLocation% to %CopyLocation%
copy %BackupLocation% %CopyLocation%

echo Backup operation completed

Technorati tags: ,

Have a thought or opinion?