Winsmarts.com

Microsoft MVP

MVP Logo

Awarded the Microsoft MVP Award.

Hosted By

blah!bLaH!BLOG!!

Backup/Restore a site collection in SharePoint 2007

.. because the recycle bin or SQL Server backups ain't enough !!

Posted on 9/25/2007 @ 3:10 PM in #Sharepoint | 11 comments | 12100 views

So we all know that Sharepoint 2007 has a fancy recycle bin. Well thats all good except if you delete an entire site or site collection itself. Then it doesn't show up in the recycle bin. Yes you read that right, not even in the administrator's recycle bin - that site - is "Gone".

Now you may think, as a good ASP.NET developer, that backing up databases is good enough. No it ain't.

So, here is something that I know you will find useful, note this down so you won't forget it.

Even if you haven’t customized (i.e. modified the css/aspx/.master files) the site, there is still a lot of configuration information that sites in SharePoint_Config databases, shared services etc.

The best way to backup a SharePoint site is –

Stsadm –o backup –url <SiteURL> -filename <FileName>

And then at a later date you can restore the site using

Stsadm –o restore –url <restoretoURL> -filename <filetorestorefrom>

A few things to be wary of –

a) The above commands must be run using proper access rights, or the restore will be half crap.

b) The above commands will restore/backup the site collection you specify at the URL. What it won’t restore is, all the configuration you need to do under shared services or SCAW. Say, if you had trusted locations defined under excel services, forms services configuration, search scopes – all that must be backed up separately.

c) You should still plan on backing up databases as a last oh shit resort.


On 12/15/2006 3:52:28 PM Mark said ..
Will the stsadm backup-restore take care of the modified css/aspx/.master files, webparts,features etc?

On 1/17/2007 4:29:51 PM Glater said ..
"The above commands must be run using proper access rights, or the restore will be half crap" Thanks for the partial documentation, now I must go research "proper access rights" as you haven't explained it...

On 1/18/2007 4:34:59 AM Sahil Malik said ..
Glater, You poor baby. I'm so sorry you had to read MSDN all by yourself. You poor poor baby. SM

On 2/5/2007 10:06:27 PM swati said ..
Will the stsadm backup-restore take care of the modified css/aspx/.master files, webparts,features etc?

On 3/27/2007 4:37:02 PM Andrew Evrovski said ..
Can anyone please tell me "how" I can backup the Search Scopes, Keywords, and Best Bets? When I do an stsadm restore, not only does it not backup the above, but it also wipes them out ont he destination server (which I find retarded). Any help would be appreciated. Andy

On 9/25/2007 11:41:08 AM kman said ..
Stsadm –o restore –url <restoretoURL> -file <filetorestorefrom> should be Stsadm –o restore –url <restoretoURL> -filename <filetorestorefrom>

On 9/25/2007 3:10:39 PM Sahil Malik said ..
Hey Kman - Thx for the comment, I fixed it!

On 2/27/2008 11:59:39 AM Phil said ..
Hi all, there is a tool that we just bought which automates this, we also used their version for 2003, ccompany is webfox.ca and the tool is Backup ELite sc 5, hope that helps. cheers phil

On 6/20/2008 5:35:08 AM raju said ..
Hey
when I took backup of sitecollection i didn't get cinfig file.how to take backup of web.config and how to restore

On 10/24/2008 7:37:46 PM Andy said ..
Hi.....I am in similar situation.....the problem is I didnt back up the site.....I am not sure if it is now possible to get the site back.....please have some comments over this

On 10/29/2008 2:52:39 AM Dok said ..
I backed up a site, and when I restore it on a new server, I don't get "Edit page" when I login as Site Administrator or Contributor except on the main page only!
why is that?

Please post your comments:


Your feedback will be submitted for moderation, and will appear after it is approved.

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 

Site designed and maintained by Sahil Malik | All Rights Reserved. ©2007 WinSmarts.com.