Ben Curry - CISSP, SharePoint Server MVP

All MindsharpBlogs

http://www.microsoft.com/mspress/books/10623.aspx

My Links

Archives

Image Galleries

Blog Stats

Favorite SharePoint Books

My Favorite Blogs

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

We had a great summit in Redmond last week and I learned a lot from the class. Thanks to all who attended.  During the presentation on Disaster Recovery, I received several requests for the command line text used during my demonstrations. So, here is a list of what we did and specific CLI instructions.

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 \\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 \\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.

I also promised 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!

posted on Tuesday, September 19, 2006 12:14 AM

Feedback

# re: Disaster Recovery SharePoint Server 2007 and Catastrophic Backup + Restore Options with stsadm.exe 9/28/2007 3:17 AM bruceus

Hello, I am wondering if there is an option to backup more items at once with stsadm command. For example I expected that it would be
stsadm.exe -o backup -directory "\\share" -backupmethod -full -item "Farm\Windows SharePoint Services Web Application" -item "Farm\SharedServices1"

..but it doesn't work that way :-(
Could you please help me?

# Catastrophic backup restore through stsadm 2/13/2008 3:19 AM Sundar Narasiman

Scenario Is it possible to perform catastrophic backup and restore through stsadm command line utility

# re: Disaster Recovery SharePoint Server 2007 and Catastrophic Backup + Restore Options with stsadm.exe 8/27/2008 6:06 AM Nishant Rana

Thanks for the info !!!

# autocad kursu 9/22/2008 3:02 AM autocad kursu

very good

# çizgi film 9/22/2008 3:03 AM çizgi film

very good

# film izle 9/22/2008 3:04 AM film izle

very good

# gaziosmanpaşa 9/22/2008 3:05 AM gaziosmanpaşa

very good

# gelinlikler 9/22/2008 3:05 AM gelinlikler

very good

# gelinlikler 9/22/2008 3:06 AM gelinlikler

very good

# havuz 9/22/2008 3:06 AM havuz

very good

# Havuz 9/22/2008 3:08 AM Havuz

very good

# ilahi dinle 9/22/2008 3:09 AM ilahi dinle

very good

# Mercedes Yedek Parçaları 9/22/2008 3:10 AM Mercedes Yedek Parçaları

very good

# müzik dinle 9/22/2008 3:11 AM müzik dinle

very good

# done 10/15/2008 9:24 AM Gym

Thank you.

Title  
Name  
Url
CAPTCHA
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments