Trying to move subsite to the root of site collection.
Scenario :- We have a farm that houses just one web application (called as WebApp1) and a subsite (Subsite1). Our plan is to create another application. This new web application will be similar to webapp1 and we decided to restore the content DB of webapp1 and then attach (using STSADM addcontentdb) to the new web-app. At first I went to central admin and opened the new web-app and removed the content db. I then issued the following STSADM command. STSADM -o addcontentdb -url http://pxeon:42042 -databasename web-app1-contentdb Above command gave error indicating that "attach operation cannot continue because another object in this farm already contains the same ID." It mentioned to use "assignnewdatabaseid" parameter. I then added this to the above STSADM command and got message 'operation' completed successfully but actually it was not. In central admin, I found that 'number of sites' was zero which was wrong. I am unable to browse the new webapp also. What could be wrong and how to overcome? Once I complete the above, I also should goto web-app2 (new webapp) and then move the subsite to the root site itself as Subsite is not required anymore. Any inputs on this will be helpful. Please suggest. Thanks in advance.
May 13th, 2010 12:26am

Essentially the ContentDBs have unique IDs and you can't have two ContentDBs with the same ID attached to the same farm. If all you wanted to do was just move a single site collection from one ContentDB to another you could use STSADM -o backup and STSADM -o restore to do that just fine.John SharePoint911: SharePoint Consulting Blog: http://www.rossonmoss.com Twitter: JohnRossJr MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2010 2:48am

The current setup for the first web-application has just a site (or subsite). So the web-application url is something like http://xyz123 and then it has a subsite and the url is then http://xyz123/subsite1. All I am trying to do is that 'subsite1' should be available to me on another web-application also. (for ex: http://abc123/subsite1). In this regard, I thought of copying over the web-app. How can I acheive the above? Also I have another task before the above task. Since there is only one subsite, users do not want always to point to url "http://xyz123/subsite1" but instead just "http://xyz123". So what is best to achieve this? Can I have just web-application without subsite at all? or else can I write some logic such that pointing to "http://xyz123" always takes to "http://xyz123/subsite1" thanks..
May 13th, 2010 4:29pm

As I said, you could use the STSADM -o backup/restore command which would move the entire site collection. So all you'd have to do is create a new Web application, then DO NOT create a site collection for it. Backup the site collection you want to move using the syntax for STSADM -o backup http://<url of web application> and then restore it to the new URL you'd created. Another option would be to create a new web application, create a new site collection, and then use the STSADM -o export and import command to just move the specific site you are referring to. STSADM Backup and restore allows you to move the entire site collection STSADM Export and import allows you to just move a single siteJohn SharePoint911: SharePoint Consulting Blog: http://www.rossonmoss.com Twitter: JohnRossJr MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2010 4:42pm

thanks.. I will try now. Could you suggest me on the below also please? Also I have another task before the above task. Since there is only one subsite, users do not want always to point to url "http://xyz123/subsite1" but instead just "http://xyz123". So what is best to achieve this? Can I have just web-application without subsite at all? or else can I write some logic such that pointing to "http://xyz123" always takes to "http://xyz123/subsite1"
May 13th, 2010 4:50pm

Yes. A web application is equivalent to a web site in IIS. When you create it there's nothing there really --- so you need to create a site collection. All you'd need to do is create a site collection at the root URL of the web application. So when you create the site collection just select to create it at http://xyz123. Here's a blog post that basically describes what you are trying to do: http://msmvps.com/blogs/shane/archive/2006/11/14/consolidating-site-collections-after-upgrading-sharepoint.aspxJohn SharePoint911: SharePoint Consulting Blog: http://www.rossonmoss.com Twitter: JohnRossJr MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2010 4:59pm

I did following steps. Ran BACKUP command on the source web-application. STSADM -o backup -url http://xyz123 -filename c:\test\test1.cmp Note: the URL above was just pointing to the web-application. This web-application has a subsite named SubSite1. I then issued below command on the target web application which was http://abc123. I created a site collection as suggested above. STSADM -o restore -url http://abc123 -filename c:\test\test1.cmp -overwrite. It created but as expected it came along with the "subsite" of source webapplication. I think it did correctly but I was hoping to have the subsite sitting directly in the root (ie. http://abc123). Are there any other extra steps to acheive this ? thanks.
May 14th, 2010 1:05am

As I said, please read the blog post that I linked in my last response. It walks you through the process of using STSADM -o export and STSADM -o import to move a site to the top level site of a site collection.John SharePoint911: SharePoint Consulting Blog: http://www.rossonmoss.com Twitter: JohnRossJr MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
Free Windows Admin Tool Kit Click here and download it now
May 14th, 2010 5:28am

I followed exactly as per the blog. What could be wrong? Upon issuing IMPORT command, I get error message as below. [5/14/2010 2:01:47 PM]: Progress: Importing List User Information List. [5/14/2010 2:01:48 PM]: FatalError: There can only be one instance of this list type in a web. An instance already exists. at Microsoft.SharePoint.Library.SPRequest.CreateListOnImport(String bstrUrl, Guid& pguidListId, String bstrTitle, String bstrDescription, Int32 lTemplateID, String bstrFeatureId, Guid guidRootFolderId, Int64 llFlags, Int32 iVersion, Int32 iAuthor, String bstrFields, String bstrContentTypes, String bstrImageUrl, String bstrEventSinkAssembly, String bstrEventSinkClass, String bstrEventSinkData, Guid guidDocTemplateId, String bstrViews, String bstrForms, Boolean bCompressedSchema) at Microsoft.SharePoint.Deployment.ListSerializer.CreateList(SPWeb parentWeb, Dictionary`2 listMetaData, Boolean usingPublicSchema) at Microsoft.SharePoint.Deployment.ListSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject) at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope) at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader) at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects() at Microsoft.SharePoint.Deployment.SPImport.Run() [5/14/2010 2:01:48 PM]: Progress: Import Completed.
May 14th, 2010 9:39pm

You can't take a subsite and make it into the root of a new site collection. There is some fundamental plumbing that is put in place when you create a site collection. Import/Export does not lay this plumbing down if its not there. While you can use import/export to move a site from one collection (or web application) to another, it will always need to be a subsite in its new location. If you want to be able to access the current site by using a new URL, simply extend the current web application and use the new URL you want for accessing the site. You will basically have two paths now to reach your content. If you want to access the subsite directly, you want what is called a Vanity URL. Todd Klindt did a post on this some time back: http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=48 Give that a look and see if it will work for you.Imagine what we could be...If we could just imagine. Daniel A. Galant
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2010 5:16am

Hi Daniel, Thanks for the reply but I guess the vanilty URL may not help me. Will the below option work for me? I will choose 'save as template' for every LIST in the subsite and then re-create them in the root. But I guess all the custom page (customized using SPD) that are in content-db (within subsite) will need to be redone again in the root site.
May 17th, 2010 10:28pm

Hi Anirudh123, I've had to do this sort of move before. There are several third-party tools out there that do this sort of thing (trimming a subsite and moving it into a new Site Collection). You may consider one of these apps if you have many of these moves to accomplish - the one that immediately comes to mind is Axceler's ControlPoint http://www.axceler.com/SharePointProducts/AxcelerControlPoint.aspx. I know for a fact that it specifically has this functionality. Thanks, Troy Lanphier
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2010 11:11pm

Troy, I haven't used the product you mention so I ask this simply for clarity. There is a difference between moving a site from one site collection to another site collection and taking a subsite from one collection and making it the root of a new collction. Are you sure Axceler will do that? I'm not seeing that in the info I can find. Again, not trying to be snarky.Imagine what we could be...If we could just imagine. Daniel A. Galant
May 18th, 2010 12:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics