locked
Want to merge all the site collections to a single one RRS feed

  • Question

  • Hi,

      I have a requirement that I need to merger around 150 team site collections to a single one. I decided to do that using stsadm batch file or powershell script. If I use stsadm then I will use stsadm export and import if I use powershell then I will use export-spweb and import-spweb.

    Now I need suggestion like which is better to use stsadm or powershell. Which has lesser limitations.

    Please suggest.

    Saturday, September 14, 2013 1:47 PM

Answers

All replies

  • Hi,

      I have a requirement that I need to merger around 150 team site collections to a single one. I decided to do that using stsadm batch file or powershell script. If I use stsadm then I will use stsadm export and import if I use powershell then I will use export-spweb and import-spweb.

    Now I need suggestion like which is better to use stsadm or powershell. Which has lesser limitations.

    Please suggest.

    Sunday, September 15, 2013 7:33 AM
  • STSADM is depreciated for 2010, go with PowerShell.
    Sunday, September 15, 2013 8:55 PM
  • Deprecated, but follows the same code path as the PowerShell Export-SPWeb/Import-SPWeb (with the exception of the initialization and validation of the PowerShell cmdlet itself).

    But I agree, use PowerShell where possible.  If anything, it is a great learning experience if you're only used to using stsadm.


    Trevor Seward, MCC

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Sunday, September 15, 2013 9:24 PM
  • But with powershell I have to first create the site explicitly and then I need to import the content , with stsadm no need to create the subsite explicitly it creates it automatically while import.

    That makes a big difference

    ** the home page of the destination site if created first explicitly and then imported contains only the default web parts of the template of the site. Even after importing the content it can not overwrite those web parts in the default page, but using stsadm if I import I dont need to create the site explicitly and it also overwrites the default page as that of the source

    So that is why I was thinking to use stsadm if there is not much functional difference if I use powershell instead of  stsadm, in this case at least

    Monday, September 16, 2013 2:54 AM
  • Hi,

    According to your post, you want to merge all the site collections to a single one and you need suggestion like which is better to use stsadm or PowerShell.

    We all know that PowerShell is a lot more powerful for most commands so it’s usually best to go down the PowerShell route. However in this case Importing and Exporting in STSADM and PowerShell run almost the same processes to its really personal choice.

    If you are going down the STSADM route then open CMD as an administrator and cd to the Hive 12/14 bin folder.

    Once there set your STSADM command, set the Operation as export, specify the URL of the site collection or Subside you want to export and set the filename and location of where you want to the exported file to go (remember to make sure that the drive has enough space).

    Here are some links for you to take a look at:

    Exporting and Importing SharePoint sites:

    http://spjohnadams.wordpress.com/2013/06/26/exporting-and-importing-sharepoint-sites/

    Performance differences between stsadm import, and powershell import-spweb, and poor performance in general:

    <ins>http://social.technet.microsoft.com/Forums/en-US/4676c993-c83d-4f72-99b5-58600e2b9e41/performance-differences-between-stsadm-import-and-powershell-importspweb-and-poor-performance-in</ins>

    How to Import Export a SharePoint Subsites:

    http://www.sharepoint.inf4web.com/326/how-to-import-export-sharepoint-subsite/

    STSADM export, Content Deployment, Content Migration API, Features/Solutions - deployment options compared

    http://www.sharepointnutsandbolts.com/2007/10/stsadm-export-content-deployment.html

    Best Regards, 

    Linda Li


    Linda Li
    TechNet Community Support

    Monday, September 16, 2013 5:09 AM
  • Thanks for all these details , but the problem is that using stsadm or powershell export many things left behind. I mean can not be exported all the items like workflow , audit report, user alerts etc

    So can anyone please share the link of all the items which can not be exported using stsadm or powershell

    Monday, September 16, 2013 12:27 PM
  • While I doubt any tool will bring over the audit reports, if you want to merge sites you're better off with a 3rd party content migration tool.  The export/import process isn't full-fidelity, unlike Backup-SPSite/Restore-SPSite.

    Trevor Seward, MCC

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, September 16, 2013 1:39 PM
  • But with backup-spsite and restore-spsite can I add a site collection as a subsite to another site collection? I think not possible

    So if not possible then is there any automated way to associate the workflows from source to destination.

    please suggest

    Monday, September 16, 2013 4:27 PM
  • Hi,

    To add a site collection as a subsite to another site collection, I suggest as follows:

    1. Add an explicit managed path ex.
    2. Add the content database wss_content_hr .
    3. Turn the other content databases to Offline except for the wss_content_hr .
    4. Created a new site collection.
    5. Exported the hr site and import it back into the new content db useing the -force parameter.

    Here is a similar thread for you to take a look at:

    http://sharepoint.stackexchange.com/questions/25666/content-db-split-sub-site-into-site-collection-is-the-only-way-and-how

    In addition, to convert Site collection into Subsite on its own Database this will help you: Convert Subsite to Site collection and Site Collection to Subsite

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support


    • Edited by Lindali Wednesday, September 18, 2013 11:25 AM edit
    • Marked as answer by Lindali Monday, September 23, 2013 1:39 PM
    Wednesday, September 18, 2013 11:24 AM