BackUp and Restore ContentDB of Site Collection


  • Hi,

    I have a requirement where i have individual content DB for my site collection and i have to take back up of ContentDB (site coll)and restore it on destination server .

    In the destination server i have the same set up Site collection with individual DB.

    I referred to the above , it attached the destination site coll to the Content DB , but it never showed the old content meaning it never restored .It just attached the site coll to dest DB (which is restored from src DB) but as a all new site coll.

    I have to restore the site coll using SQL DB backup method is there any way ?

    Thanks in Advance ,


    Saturday, April 8, 2017 7:32 AM

All replies

  • To restore a Content DB with an existing site collection to a new farm you need to first delete any existing site collection that occupies the same URL hierarchy in the destination farm.  Otherwise your restored site collection won't show up because there is already an existing site collection there.

    The easiest way to do this is to create a new web application in the destination farm and attach the restored Content DB to that web application before you create any site collections.  Then you should see the restored site collection in the new web application URL.

    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Saturday, April 8, 2017 11:07 AM
  • HI Pallavi,

    First take back up of DB which contains the site collection and restored in DB in database server of UAT or destination server. Use "Recover data from unattached content database" feature in CA->Back up Restore->Granular back up section. From here you can easy take back up and restore site wherever you want. This entire process taken care by CA. Hence failing changes are minimal.





    Please mark as Answer, if this post solves your issue.

    Saturday, April 8, 2017 2:51 PM
  • Hi,

    You should separate the site collection into different database before taking backup.

    I see you are taking the content database with web application not specific to site collection.

    Please follow up this article and not to use the deprecated tool "STSADM"

    Please remember to click Mark as Answer on the answer if it helps you

    Monday, April 10, 2017 3:51 AM
  • As Murugesa says, don't use STSADM.

    Having said that, what exactly is not working as you description isn't very clear. Can you describe what happened and what you wanted to happen in a bit more detail?

    Monday, April 10, 2017 8:48 AM
  • Using database upgrade method to move a Content database from one farm to another should be applied as the following: 

    • In source farm, Take a backup of the content database via SQL management Studio.
    • In destination farm, Create A web application, Site collection.
    • In destination farm, Dismount the web application content database, via this command
      Dismount-SPContentDatabase "<ContentdBName>"
    • In destination, via SQL Management Studio , Restore the content database.
    • In destination , Mount it to the created web application,
      Mount-SPContentDatabase "<ContentDb>" -DatabaseServer "<DbServer>" -WebApplication http://SiteName
    • In destination farm, Change Site collection administrator to avoid the access permission issue. by going to site Setting > Site Collection Administrator > Set the site admin account in Dev.
    • Finally, deploy your custom web part solutions as mentioned at Install and deploy a SharePoint (WSP) Solution Package using SharePoint Shell.

    Monday, April 10, 2017 1:05 PM