none
Creating a Sharepoint test environment based on Production environment

    Question

  • Hi all,

    I have read several articles related to how to clone a Sharepoint to create a test environment, but all that did not work for me. My objective is to have a test environment running on the same network off Sharepoint Production.

    My scenario:

    Sharepoint 2010: ServerA - Hyper-v Virtual Machine 

    Sql2008 R@ : ServerB - Hyper-V Virtual Machine

    I would like copy the Sharepoint Production vhd and use it to create a test environment, other SQL server must be used and the both environment must be run together on same network.

    how can I do this?


    Certified (35) | ITIL | MCP | MCDST | MCSA1 | MCSE1 | MCT | MCTS Sharepoint | MCITP SQL | MCSA Windows 2012 | MTA Security | MCSE Windows 8 | MCSE Windows 2012 | Vencedor do Winthe7.com.br 2009, Quarto lugar Copa de Talentos Microsoft 2010

    Monday, December 02, 2013 7:43 PM

Answers

  • Don't do what you'd like to do, you'll end up breaking production.

    SharePoint does not support cloning of servers after the Config Wizard has been run. To elaborate, there are hard-coded references to the SQL Server and SharePoint server(s) within the Configuration database that cannot be changed. So if you clone the production WFE, then remove the "Test" WFE from the "Test" farm, you'll actually remove the production WFE from the farm!

    You'll want to create a brand new farm, then take a backup of production using Backup-SPFarm -Full, and restore it to the test farm.

    It is best if you use PowerShell (like http://autospinstaller.codeplex.com) to build your farms as it makes it easy to repeat the build process and be consistent.

    You can also use a product like http://spdockit.com to document a farm and recreate it based on documentation.

    Here is how I set up test environments:

    http://sharepoint.nauplius.net/sharepoint-test-environments/


    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, December 02, 2013 7:46 PM
    Moderator
  • You would probably know that SharePoint does not support cloning or snapshoting VMs or copying your Config DB or Admin DB. 

    My recommendation is to create your dev environment from scratch i.e. by installing SharePoint and creating new Config DB. I would also recommend using separate service accounts while installing SharePoint in development environment. 

    Once your Development environment is up you can then use the backup and restore operation to restore the Production content and/or services.

    Trevor has a very good article on this.

    http://sharepoint.nauplius.net/sharepoint-test-environments/


    Amit

    • Proposed as answer by thriggle Monday, December 02, 2013 8:52 PM
    • Marked as answer by Adriano Neiva Tuesday, December 03, 2013 12:05 PM
    Monday, December 02, 2013 7:48 PM

All replies

  • Don't do what you'd like to do, you'll end up breaking production.

    SharePoint does not support cloning of servers after the Config Wizard has been run. To elaborate, there are hard-coded references to the SQL Server and SharePoint server(s) within the Configuration database that cannot be changed. So if you clone the production WFE, then remove the "Test" WFE from the "Test" farm, you'll actually remove the production WFE from the farm!

    You'll want to create a brand new farm, then take a backup of production using Backup-SPFarm -Full, and restore it to the test farm.

    It is best if you use PowerShell (like http://autospinstaller.codeplex.com) to build your farms as it makes it easy to repeat the build process and be consistent.

    You can also use a product like http://spdockit.com to document a farm and recreate it based on documentation.

    Here is how I set up test environments:

    http://sharepoint.nauplius.net/sharepoint-test-environments/


    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, December 02, 2013 7:46 PM
    Moderator
  • You would probably know that SharePoint does not support cloning or snapshoting VMs or copying your Config DB or Admin DB. 

    My recommendation is to create your dev environment from scratch i.e. by installing SharePoint and creating new Config DB. I would also recommend using separate service accounts while installing SharePoint in development environment. 

    Once your Development environment is up you can then use the backup and restore operation to restore the Production content and/or services.

    Trevor has a very good article on this.

    http://sharepoint.nauplius.net/sharepoint-test-environments/


    Amit

    • Proposed as answer by thriggle Monday, December 02, 2013 8:52 PM
    • Marked as answer by Adriano Neiva Tuesday, December 03, 2013 12:05 PM
    Monday, December 02, 2013 7:48 PM
  • If you want the Test server configuration to be the same as production then you need to do the following in order to make it work properly.

    1. Take a snapshot of your production VM and restore it in your test environment.
    2. Run the configuration wizard to disconnect from the farm and create a new farm.
    3. Take a farm backup of your production
    4. Restore your farm backup to your test environment

    The above steps will save you from creating and building new servers, etc... However, if you got your servers built, your best bet is a backup/restore of your farm.

    Mike

    Saturday, December 07, 2013 8:45 PM
  • Mike, what you're leading to will disconnect the production server from the farm if there is any valid network connectivity between the test environment and production environment.

    Never take snapshots and restore them to alternate VMs as they'll have references to your production SQL Servers and will impact production services.


    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.

    Saturday, December 07, 2013 8:46 PM
    Moderator