none
How to Restore the backed sitecollection in a Subsite ?

    Question

  • Hi Friends,

       I am Ali, I need to Restore the Top level site backup into Subsite.

    1. I created site and deployed Visual webparts and created some lists. here i have taken backup (backup-SPSite -Identity <url> -Path <filepath> -Force -NoSiteLock) .

    2. In another sitecollection i have created subsite, Now i need to Restore the complete backup of top level site into subsite.

    here i used this (Restore-SPSite -Identity <url> -Path<filepath> -Force) but didt work.

    please anybody help me

    Thanks,

    Ali.


    MD.Liakath ali
    Wednesday, December 15, 2010 10:41 AM

Answers

  • Ali --

    The link that Naveed pointed you to mentions this, but its not right up front in the thread so I'm going to try to explain the situation better for you. The problem here is that SharePoint treats a top-level site collection much differently than it does a subsite.

    The most granular that you can get with a SharePoint site collection backup is to restore it back to an equivalent site collection level within a SharePoint farm, regardless of whether that is the farm it originated in or another separate farm. In order to restore a site collection to the level of a subsite (known as a "web" within the SharePoint object model), you are going to have to do an export of the target site collection instead of a backup, then import that into the target subsite.

    With STSADM you'll need to use the Export operation: http://technet.microsoft.com/en-us/library/cc262759%28office.12%29.aspx to first export the site collection to a content migration package. You'll then want to use the Import operation to import the site collection in as a subsite: http://technet.microsoft.com/en-us/library/cc261866%28office.12%29.aspx

    You may also be able to use the new granular restore options in SharePoint 2010 through the Central Admin site, but I am pretty sure you'll need to backup the content database containing the site collection and then add it as a read-only database in order to be able to target it properly, and even then I'm not sure if you can restore a site collection to a subsite with that or not.

    Does that help?

    John

    (Naveed, I would strongly recommend that you refrain from proposing your own posts as answers in the future, the moderators of these forums tend to really frown on that sort of thing)


    MCTS: WSS v3, MOSS 2007, and SCOM 2007
    MCITP: Enterprise Project Management with Project Server 2007

    Now Available on Amazon - The SharePoint 2010 Disaster Recovery Guide. Also available - The SharePoint 2007 Disaster Recovery Guide.
    My blog: My Central Admin.
    • Edited by John Ferringer Wednesday, December 15, 2010 2:41 PM updating w/ clickable hyperlinks
    • Marked as answer by Liakath Saturday, December 18, 2010 9:42 AM
    Wednesday, December 15, 2010 2:40 PM

All replies

    • Proposed as answer by Naveed Mohammad Wednesday, December 15, 2010 10:52 AM
    Wednesday, December 15, 2010 10:51 AM
  • Hi Naveed,

           I tried but didt work

    Taken backup with this "stsadm -o backup -url <url> -filename <filename>"

    Created subsite with this "stsadm -o createweb -url <url>"

    Restored with this "stsadm -o restore -url <url> -filename <filename> -overwrite"

    here i am getting this error

    " the specified URL is not a top-level website. The backup and restore operations work only for top-level web sites. Enter the URL for a site to try the operation again "

    Is any other way?

    Thanks

    Ali


    MD.Liakath ali
    Wednesday, December 15, 2010 11:21 AM
  • Ali --

    The link that Naveed pointed you to mentions this, but its not right up front in the thread so I'm going to try to explain the situation better for you. The problem here is that SharePoint treats a top-level site collection much differently than it does a subsite.

    The most granular that you can get with a SharePoint site collection backup is to restore it back to an equivalent site collection level within a SharePoint farm, regardless of whether that is the farm it originated in or another separate farm. In order to restore a site collection to the level of a subsite (known as a "web" within the SharePoint object model), you are going to have to do an export of the target site collection instead of a backup, then import that into the target subsite.

    With STSADM you'll need to use the Export operation: http://technet.microsoft.com/en-us/library/cc262759%28office.12%29.aspx to first export the site collection to a content migration package. You'll then want to use the Import operation to import the site collection in as a subsite: http://technet.microsoft.com/en-us/library/cc261866%28office.12%29.aspx

    You may also be able to use the new granular restore options in SharePoint 2010 through the Central Admin site, but I am pretty sure you'll need to backup the content database containing the site collection and then add it as a read-only database in order to be able to target it properly, and even then I'm not sure if you can restore a site collection to a subsite with that or not.

    Does that help?

    John

    (Naveed, I would strongly recommend that you refrain from proposing your own posts as answers in the future, the moderators of these forums tend to really frown on that sort of thing)


    MCTS: WSS v3, MOSS 2007, and SCOM 2007
    MCITP: Enterprise Project Management with Project Server 2007

    Now Available on Amazon - The SharePoint 2010 Disaster Recovery Guide. Also available - The SharePoint 2007 Disaster Recovery Guide.
    My blog: My Central Admin.
    • Edited by John Ferringer Wednesday, December 15, 2010 2:41 PM updating w/ clickable hyperlinks
    • Marked as answer by Liakath Saturday, December 18, 2010 9:42 AM
    Wednesday, December 15, 2010 2:40 PM