Copy a sharepoint web application to a different Server

I have a working Sharepoint portal on a Server. I now need to create a replica of that SharePoint portal on a completely new/ different server. There will also be a new SQL Server. Can you please provide directions to what I need to copy. Should I copy at the Web Application level or the Farm level?
For now, I saved the site as template and obtained a .wsp file. How good is that going to work?

Please advise.
Who is Participating?
skipper68Connect With a Mentor Application Development ManagerCommented:
Here is what I would do.  

Set up my sql server.  

Set up a Web Front End and install SharePoint.  
The only true "mirror" that you need really is the content database that you currently have in production.  
     Have your DBA make a copy of the content database and move it to the text development sql box.  

In the new WFE - after you have installed SharePoint
Create a web app.  
      Example:  myserver:11
Create a site collection
      This new site collection will have a content database attached to it.  Use Central Admin to find out what the name of it is

After you verify the site is up go into SharePoint Management powershell and run:  
      Dismount-SPContentDatabase -identity wss_content_database  
      It will ask you if you are sure and hit enter

Then attach the content database that was moved over to the test sql server by running:
      Mount-spcontentdatabase -identity wss_nameofcontentdatabase -webapplication http://myserver:11

Now you will be able to go to the web site and it will be a copy of what you have in production.
skipper68Application Development ManagerCommented:
You can't save a web application as a template.  You can save the top level site collection as a template, but not the web application.

Depending on where you are restoring it to, you can use the SQL Backup\Restore method and reattach the content database to SharePoint.  I can outline these steps if you need.

What version of SharePoint are you using?
Angel02Author Commented:
Thank you. That would be great if you could outline the steps. Excuse my ignorance but I am curious to know if "SQL Backup\Restore method and reattach the content database to SharePoint" will copy the Web Application or Site collection? does it have any limitations?

I am using Sharepoint 2010.
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

skipper68Application Development ManagerCommented:
The backup\restore method i'm talking about will for all intents and purposes duplicate the farm.  This process is used for creating a dev\test environment from a production site.

The biggest determining factor here between backup methods is going to be how much content you have in your farm.  What is the combined size of your content databases?
Angel02Author Commented:
Sorry, I currently can't access the SQL server to give you the content size. I ma in the requirements gathering stage. I can however tell you that it's a really small site and content size might not be an issue.

If I had to copy each site collection as template and obtain .wsp for each, will it be any helpful to create a similar SharePoint site if not replica?

I am just trying to understand each scenario. Thanks for helping.
skipper68Application Development ManagerCommented:
You can do it the way you are using the "Save Site As Template" but that will require you to upload each wsp before you can create a new site collection based on that template.
You can backup each site collection separately using powershell
     Backup-SPSite -Identity <SiteCollectionGUIDorURL> -Path <BackupFile> [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose]

Then restore them each:
     Restore-SPSite -Identity <SiteCollectionURL> -Path <Backup file> [-DatabaseServer <DatabaseServerName>] [-DatabaseName <ContentDatabaseName>] [-HostHeader <Host header>] [-Force]
Angel02Author Commented:
Great! Thank you for the detailed steps with the perfect solution. Can these also be performed if the new environment/website is on a completely different server and different network?

can you please also answer my question above about .wsp?
skipper68Application Development ManagerCommented:
You can also backup using Central Admin
skipper68Application Development ManagerCommented:
The ones I outlined first can be done on a new network.  The last one I posted cannot be moved to a new network.
Angel02Author Commented:
If I cannot get access to SQL restore/ backup, is there any other way to copy at least the design templates?
skipper68Application Development ManagerCommented:
If you can log onto the sharepoint server, you can use the powershell method.

If you can get to all of the site collections through a browser, you can use the "Save As Template" method.
*  Save as template
*  Save the templates locally
In the newly created environment
*  Upload the templates
*  Create new sites based on the templates
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.