Disaster Recovery SharePoint Server 2007 and Catastrophic Backup + Restore Options with stsadm.exe

Backup/Restore a Site Collection using stsadm.exe:
In the 12 Hive ( C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN )
stsadm -o backup -url http://portal.contoso.msft/sites/site2backup -filename c:\site2.bak
To restore, simply replace backup with restore
This will create a full fidelity backup of the site that can be restored to the same farm or different farm, if required.  Remember that if you restore to a different AD Domain, all list items will lose permissions and the site collection users list will be empty. Best practice is to always backup/restore in the same AD Domain/Forest.

Using stsadm.exe for Catastrophic ( Farm Level Backup / Restore )
From the 12 Hive: stsadm -o backup -directory file://backupservernetbiosname/backupsharename -backupmethod full
optionally, you can append the following for an item level restore (no, not List Item level, only Web Application item level):
stsadm -o backup -directory file://backupservernetbiosname/backupsharename -backupmethod full -item “Farm\Windows SharePoint Services Web Application\WebAppName“
Remember (1) the UNC share must have the following permissions enabled:
The account authenticated to Central Administration when using the UI
The logged on account when manually running stsadm.exe
The Run As account when scheduling scripted backups in Control Panel
The Central Administration pool account in Internet Information Services
SQL Server account, if Local System is the SQL service account
The SPTimer service account, if using the Central Administration UI (This is, by default, the same account used by the Central Administration App Pool)
(2) You can’t use the differential option until you have run at least one Full backup after a new installation or after creating a new web application.
You can replace the backup option with restore .  You will need to specify the type of restore, either New or Overwrite. The New option will allow you to create a parallel database with a different name and can even be on another DB server.  The Overwrite option will completely overwrite your data, so be careful with this option. When restoring, you can also choose a different DB server and use the -restoreconfigurationdatabase  option.  This is very dangerous on a production farm and should only be considered when restoring the entire farm or restoring to a failover farm.

An IIS Backup script
This will backup the IIS Metabase in the target host’s %systemroot%\system32\inetsrv\MetaBack directory. You can create as many lines as needed in a .bat file and schedule it in control panel. Remember to  give the RunAs account appropriate permissions.
cscript.exe %systemroot%\system32\iisback.vbs /s servername /u accountname  /p password /backup /b WeeklyBackup /v NEXT_VERSION /e backuppassword

Why backup with a password ? It will allow you to restore the metabase to any server, not just the one you backed up !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: