none
Copy Site Collection RRS feed

  • Question

  • Hello,

    I'm beginner as a SharePoint Developer. I need assistance, how to copy/duplicate Site Collection(include content) from Production Server to Staging Server? Is there any step by step instruction to follow? 

    Thank You

    Thursday, January 11, 2018 7:49 AM

All replies

  • You can follow this resource containing step by step details to achieve this task - https://blog.devoworx.net/2017/03/30/pwa-2013-migration/
    Thursday, January 11, 2018 9:15 AM
  • Hi,

    You can perform Backup and Restore commands from SharePoint Management Shell.

    Commands:  Backup-SPSite and Restore-SPSite

    Backup Command Reference: https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/backup-spsite?view=sharepoint-ps

    Restore Command Reference: https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/restore-spsite?view=sharepoint-ps



    Thanks, Pankaj Badoni


    • Edited by Pankaj Badoni Thursday, January 11, 2018 10:03 PM Hyperlinks
    Thursday, January 11, 2018 10:02 PM
  • In my opinion you should make sure that the site collection is on it's own database (by itself). If it isn't use PowerShell to move it using the Move-SPSite cmdlet (use SharePoint Management Shell) to move it to its own site collection.

    Then make sure that the Staging and Production Servers are the same version and build. Then copy the database from the production SQL server to the Staging SQL Server and use Mount-SPContentDatabase  in the Staging farm (use SharePoint Management Shell) in order to mount it to the identical webapplication. 

    You should be able to browse to it with everything keeping in tact including workflows and history and such.


    • Edited by mcantin Thursday, January 11, 2018 10:09 PM
    Thursday, January 11, 2018 10:08 PM
  • Hi,

    You can use the STSADM command to achieve it.

    1.        To back up a site collection, you must use the following STSADM command.

                 stsadm –o backup –url <URL of the site collection> -filename <Name of the backup file>

    1.        To restore a site collection, you must use the following STSADM command.

                 stsadm –o restore –url <URL of the site collection> -filename <Name of the backup file> -overwrite

    If you want to copy the whole web application follow these steps

    • Take the backup of the content database of web application in server1
    • create a web application on server2
    • restore the content database in server2
    • detach the content database from the web application created on server2
    • attach the new content database to new web application.

    This will copy all the documents in document library. This method supports more than 2TB content database size.

    Best Regards,

    Carl Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Wednesday, January 24, 2018 1:55 AM
  • You can backup/restore the site collection by sharepoint powershell.

    The powershell will backup/restore the site include all data.

    Backup-SPSite http://sitecollectionurl -Path C:\backupname.bak

    Restore-SPSite http://sitecollectionurl -Path C:\backupname.bak

    Wednesday, January 24, 2018 5:38 AM
  • Hi,

     

    If the post helps you, you can mark it as answer to help other community members to find the information quickly.

    Have a nice day!

     

    Best Regards,

    Carl Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Thursday, February 1, 2018 3:21 AM