Managing your sites & site collections with stsadm

Posted on 6/24/2007 @ 11:58 PM in #SharePoint by | Feedback | 5874 views

Here are a bunch of commands in stsadm that I find useful every now and then to manage my sites and site collections.

1. Backup a site collection:  stsadm -o backup -url http://urlname -filename <filename>

2. Restore a backed up site collection:  stsadm -o restore -url http://urlname -filename <filename>

3. Backup a single site: stsadm -o export -url http://urlname/sitename -filename <filename>

4. Restore a single site: stsadm -o import -url http://urlname/sitename -filename <filename>

(Note #3 and #4 require you to be careful of non-unique GUIDs if working with the same DB, there is a commandline parameter to force create new GUIDs)


Here are interesting problem solving solutions based on the above:

Move or Copy a site collecton - #1 followed by #2

Move or Copy a site - #3 followed by #4

Convert a site into a site collection - #3 followed by #4 on a top site URL

Convert a top level site collection into a site - #3 targeted to the top level URL followed by #4.

Break Apart a content database - Use stsadm -o createsiteinnewdb to create a top level URL first, and then use #3 and #4 on that target URL.

Sound off but keep it civil:

Older comments..

On 7/17/2007 8:45:06 AM Nithya said ..

Doing an export and import of the site is not preserving the customization done on the DispForm.aspx for the list items. The issue is due the GUID that is used as name of the list. Can you please let me know how to move a site preservering "Everything".

Thanks and Regards,