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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DougApplication 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.
DougApplication 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?
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

DougApplication 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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
DougApplication 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?
DougApplication Development ManagerCommented:
You can also backup using Central Admin
DougApplication 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?
DougApplication 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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.