17 August 2010

Sharepoint Web application recovery from a SQL backup

I have a MOSS 2007 server that is not really in active use but of course we have a few users that trust their lives to some of the content on there.

I had a user delete a site by accident.  Great! Now what?

I check to see if my stsadm backup that is set to run with a script and a scheduled task succeeded the night before  - no luck  - this has not run for about 2 weeks. ( I did say it is not really active)

So last hope was to check the SQL backups.  Thankfully this succeeded the night before. 

So the recovery path would be as follows.

  • Create a new database
  • Restore backup of the original database to the new one
  • In SharePoint Central Administration under Application Management remove the current content database.
  • Using stsadm attach the new content database
  • Run IIS reset
  • Check the site to see if everything is working 100% and that the missing site is back.
The stsadm command I used was:

stsadm.exe -o addcontentdb -url -databasename -databaseserver

Some notes about my not so successful recovery attempts:

If you attach the recovered content database to the application before removing the old one the sites "that are duplicates" will be ignored by Sharepoint.

If you get your user to see if her content is back before running IISreset you will look like you don't know what you are doing because the missing site will not show up yet.

No comments:

Post a Comment