Tip #52: STSADM doesn't support import subsite as root site

Rate this item
(0 votes)

Be careful when you try to import sub-site to be your root site, especially when you have publishing sites. STSADM import/export doesn't work doesn’t work too well when you export a sub-site and import it to the top level site in a site collection.

When you get you resulted root site you Template Settings page (Site Settings-> Page Layout), and Site Setting -> Create Page are corrupted.

Data at the root level is invalid. Line 1, position 1. 
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()

and there are a lot of other stuff that is broken - master page, content types, navigation, web parts and etc. You can fix it manually, but there is a STSADM extension gl-repairsitecollectionimportedfromsubsite that do you work for you.

Refer to that blog post for more details http://stsadm.blogspot.com/2007/09/convert-sub-site-to-site-collection.html

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.