locked
Move Site and subsites to new Web application RRS feed

  • Question

  • Hi

    I have a SharePoint Site used for Sure Step.  Each Sure Step project is a subsite.  This Sure Step site has its own set of permissions to the rest of the site collection.  I want to move the Sure Step site, related contents and subsites to its own web application.

    What is the best way to move this Site and all of its contents including sub sites to a new web application?

    Thanks

    Marc Collins


    Marc Collins www.QGate.co.uk

    Friday, April 12, 2013 3:29 PM

Answers

  • If somehow powershell command is not working, then you can try for the stsadm command to export and import the site (along with its subsites).

    stsadm.exe -o export -url "<sitename>" -filename "D:\backup\" -includeusersecurity -overwrite

    stsadm.exe -o import -url "<sitename>" -filename "D:\backup.cmp" -includeusersecurity

    Tuesday, April 16, 2013 9:19 AM
  • In that case you'll need to bind to the site and loop through each web with a foreach statement:

    $siteURL = "http://site" $site = Get-SPSite($siteURL)

    foreach($web in $site.Allwebs} etc.

    And do the same substituting import-spweb


    Hope This Helps!


    Friday, April 12, 2013 4:15 PM

All replies

  • Backup-SPSite and Restore-SPSite cmdlets if the structure is:

    http://url/Sure Step
    http://url/Sure Step/project
    http://url/Sure Step/project1

    http://technet.microsoft.com/en-us/library/ff607901.aspx - backup
    http://technet.microsoft.com/en-us/library/ff607788.aspx - restore


    Hope This Helps!


    • Edited by ThatGuyRyan Friday, April 12, 2013 3:42 PM linkage
    Friday, April 12, 2013 3:41 PM
  • This is what I tried first.  Unfortunately, Sure Step is a site and not a site collection.

    I have also tried export-SPWeb however it only exportsthe top level site and not the subsites.


    Marc Collins www.QGate.co.uk

    Friday, April 12, 2013 4:12 PM
  • In that case you'll need to bind to the site and loop through each web with a foreach statement:

    $siteURL = "http://site" $site = Get-SPSite($siteURL)

    foreach($web in $site.Allwebs} etc.

    And do the same substituting import-spweb


    Hope This Helps!


    Friday, April 12, 2013 4:15 PM
  • I thought this may of been the case.  I was struggerling and I wanted to make sure before I invested too much time on it.

    Thanks


    Marc Collins www.QGate.co.uk

    Friday, April 12, 2013 4:23 PM
  • I have another question on this.

    In my ForEach statement, how do I loop "-path xxx.bak"?  Or does each step add to the .bak?


    Marc Collins www.QGate.co.uk

    Friday, April 12, 2013 4:37 PM
  • $web.name + ".bak"
    that may work?

    Hope This Helps!

    Friday, April 12, 2013 4:44 PM
  • I Suggest you use below link, it give details instruction on how to move subsite to different site collection 

    http://www.codeproject.com/Articles/356985/Moving-a-Sharepoint-Sub-Site-to-its-own-Site-Colle


    If this helps Please mark it answer or Vote As Helpful.

    Thanks
    Siddharth Vaghasia

    Sunday, April 14, 2013 4:43 PM
  • Hi Siddharth

    Although this is a helpful blog, it only gives instructions on how to move a single site.  The issue I am facing is that I need to move a site AND all child sites.


    Marc Collins www.QGate.co.uk

    Tuesday, April 16, 2013 7:24 AM
  • If somehow powershell command is not working, then you can try for the stsadm command to export and import the site (along with its subsites).

    stsadm.exe -o export -url "<sitename>" -filename "D:\backup\" -includeusersecurity -overwrite

    stsadm.exe -o import -url "<sitename>" -filename "D:\backup.cmp" -includeusersecurity

    Tuesday, April 16, 2013 9:19 AM
  • Hi Shailesh

    This is exactly what I want.  I have tried this and it has worked.


    Marc Collins www.QGate.co.uk

    • Proposed as answer by Shailesh_Kumar Wednesday, April 17, 2013 9:12 AM
    Tuesday, April 16, 2013 11:29 AM