3

Farm 1 consists of several custom solutions and a web application that has custom features and a custom master page.

I have just configured a Farm 2.

I want to export the web application along with all the specification that it has in Farm1 to 2.

Is there any defined way to do so, that would help me copy everything that is assosiated with the web application?

5

You would need to

  • Create a new Web Application in farm 2
  • Export solutions* from farm 1
  • Install solutions in farm 2
  • Backup content databases belonging to the web application in farm 1
  • Restore all content databases in farm 2
  • Enable all features on farm 2 Web App | Site | Web that are enabled in farm 1 web app
  • Test

From an abstract level, this works. To make things easier, have the same patch level in farm 2 as in farm 1 before you start to back up content databases.

*) Export Solution

if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"}
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
{
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$farm = Get-SPFarm
$file = $farm.Solutions.Item("solutionName.wsp").SolutionFile
$file.SaveAs("c:\temp\solutionName.wsp") 
  • I have access to the TFS where all the solutions are saved, if I were to use that, would you please help me with the approach and certainly give some directions. – CodeAbaddon Dec 5 '16 at 14:32
  • @CodeAbaddon Sure! Use the once in TFS, it's probably easier than extracting excising solutions. – Benny Skogberg Dec 5 '16 at 14:38
  • I have never worked with TFS, hence the additional questions. Should I connect my farm to the TFS or should I just do the above given steps only the download source of solution changes from server to TFS? Can I directly deploy solutions to my farm from TFS – CodeAbaddon Dec 5 '16 at 14:40
  • @CodeAbaddon I've updated the answer, with an easier way to export the solutions. – Benny Skogberg Dec 5 '16 at 14:49
3

Due to customization, most of stuff is manually and required extra steps.

  1. Build New Farm( make Sure it should be same version level)
  2. Create and Configure the Service Applications
  3. Create a New Web application and configure the Authentication. make sure same authentication
  4. Now you have the Apply the customization( i.e any web .config change, hive folder changes etc)
  5. Deploy the solutions in farm 2 ( i would prefer to deploy the solution using powershell), you should get source files( wsps)
  6. Now activate features and apply the master page etc
  7. Backup the Content DB from Farm 1
  8. Restore the Content DB in Farm 2 and attach it to the web application.
  9. now test it.
  • Step 1,2,3 is done. 4 is null. from step 5 should I have an option, the files are also stored in the TFS, can I connect the TFS to my SP farm directly and deploy solutions from there? the web app doesnt have any data in it at the moment, is it still necessary to get the content DB? – CodeAbaddon Dec 5 '16 at 15:14
  • i am not sure about the TFS, but i would did manual deployement...using the powershell.I think use the same as it is tested and reliable. ....When you create new web application, it automatically create a content DB then you have to create root level site collection. so you have some basic data....Now you can install and activate features...once tested all the functionality is there then you can attached/detach dbs – Waqas Sarwar MVP Dec 5 '16 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.