locked
best approach to set up a staging environment based on production farm? RRS feed

  • Question

  • What is the best approach to set up a staging environment based on production farm? I'd like to image the WFE prod machine since I have lots of add-on and custom code installed in Prod. It will take long time to do a clean install.

    We have production farm with 3 WFE, one App and a SQL cluster.

    We are going to set up a staging environment as much similar as possible with Prod.

    1. The staging will be in separate domain with separate AD etc.

    2. I can't move all the production content DB to staging cause the DB is huge.

    Thursday, September 29, 2011 8:11 PM

Answers

  • Well that depends on what exactly you mean by a staging environment, and how you would like to move "stuff" from staging to production.  If you plan to export WSP's then you could just clone the environment (including the DC) using a P2V tool, stick it in a host only network and use RDP to access it so they are technically on different networks with different DC's, albeit cloned.  If you want to publish the data from staging to production that won't work as there won't be a direct route to the production service so you'll need to be fiddling with DB exports or attaching to blank sites and extracting data (messy supporting that and your huge DB's wont help you at all here).

    If you really want a separate DC and domain then bite the bullet, build your staging farm correctly and then take a backup of your content DB's, strip them off data not needed so you have smaller DB's to copy and then restore them to prod as it was before the backup.  Take the smaller copies of the prod content DB's and attach them to the staging farm. Restore the content databases, change the site collection admins to ones from the new domain and use move-SPUser to migrate user accounts from the old domain to the new one.

    That way you have a correctly configured and somewhat standard deployment route.  Link on how to move DB's below.

    http://technet.microsoft.com/en-au/library/cc512725.aspx

    Someone might point you at configuration only backups for cloning, which are not for this purpose really.  http://sharepointinterface.com/2010/09/10/configuration-only-backup-and-restore-in-sharepoint-2010/ but you should read up on it anyway.

     

     


    Regards John Timney http://www.johntimney.com
    Thursday, September 29, 2011 9:42 PM
  • Same really.  You still need to build servers with at an appropriate stage to sysprep them and generate unique SIDs and have them joined to the domain, so you can't just copy them to create another farm. 
    Regards John Timney http://www.johntimney.com
    Friday, September 30, 2011 1:17 PM

All replies

  • Well that depends on what exactly you mean by a staging environment, and how you would like to move "stuff" from staging to production.  If you plan to export WSP's then you could just clone the environment (including the DC) using a P2V tool, stick it in a host only network and use RDP to access it so they are technically on different networks with different DC's, albeit cloned.  If you want to publish the data from staging to production that won't work as there won't be a direct route to the production service so you'll need to be fiddling with DB exports or attaching to blank sites and extracting data (messy supporting that and your huge DB's wont help you at all here).

    If you really want a separate DC and domain then bite the bullet, build your staging farm correctly and then take a backup of your content DB's, strip them off data not needed so you have smaller DB's to copy and then restore them to prod as it was before the backup.  Take the smaller copies of the prod content DB's and attach them to the staging farm. Restore the content databases, change the site collection admins to ones from the new domain and use move-SPUser to migrate user accounts from the old domain to the new one.

    That way you have a correctly configured and somewhat standard deployment route.  Link on how to move DB's below.

    http://technet.microsoft.com/en-au/library/cc512725.aspx

    Someone might point you at configuration only backups for cloning, which are not for this purpose really.  http://sharepointinterface.com/2010/09/10/configuration-only-backup-and-restore-in-sharepoint-2010/ but you should read up on it anyway.

     

     


    Regards John Timney http://www.johntimney.com
    Thursday, September 29, 2011 9:42 PM
  •  

    Thanks John.

    How if my staging and production in same domain and AD?

    How i approach it then?

    Friday, September 30, 2011 9:26 AM
  • Same really.  You still need to build servers with at an appropriate stage to sysprep them and generate unique SIDs and have them joined to the domain, so you can't just copy them to create another farm. 
    Regards John Timney http://www.johntimney.com
    Friday, September 30, 2011 1:17 PM