Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 808
  • Last Modified:

Cloning IIS 7.5 website from one server to another

Hi,
We have an app running on IIS 7.5 that we would like to move to another IIS 7.5 server. I would like to first export/import the site from old to new server and test it before the final cut over.

I found something about web deploy tool that I can use. What would be the best way to use this tool to make a duplicate site from old to new server for testing?

Thanks,
Sharad
0
sharad_rai
Asked:
sharad_rai
  • 9
  • 4
  • 4
1 Solution
 
bepsoccer1Commented:
This should help you packing and deploying to the new server using web deploy.  Should be rather painless.  http://www.iis.net/learn/publish/using-web-deploy/packaging-and-restoring-a-web-site
0
 
sharad_raiAuthor Commented:
Thanks bepsoccer1,
Steps look fairly simple! This will however not break anything on the production site right? We want that site to be fully functional while we test the site on the new server.

Sharad
0
 
sharad_raiAuthor Commented:
msdeploy.exe -verb:sync -source:apphostconfig="Default Web Site" -dest:package=c:\dws.zip > DWSpackage7.log

oops, one more question. So I will change the "Default Web Site" to the name of the site I want to copy, correct? Please also note, I have multiple sites running on the same old server with host headers and I want the site also function in the same way on the new server.

Thanks,
Sharad
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
bepsoccer1Commented:
No, it should not stop IIS or impact it when you run it.  And yes, replace "Default Site" with the name of your site.
0
 
sharad_raiAuthor Commented:
I will give it a try now... Thanks,
0
 
sharad_raiAuthor Commented:
Will the switch "...-verb: sync" attempt to keep these sites in sync when online? Any change on one site will change the other site as well?
I'm sorry for my naiveness but it's been a while that I have worked with IIS.

thanks, Sharad
0
 
bepsoccer1Commented:
No it will not continue to try to sync that is something completely different which is know as web farm framework.
0
 
ajmehtaCommented:
That seems like a great tool, but FWIW, I've always used the GUI for robocopy and it's worked perfectly (including permissions on NTFS folders, which is usually a pain even if you get the site copied because permissions may not be).  That does require resetting up in IIS though for HTTP/HTTP/FTP.  Are you also just doing a restore of the DB for the site (if applicable)?
0
 
sharad_raiAuthor Commented:
Hi ajmehta,
I did run that tool (msdeploy) and the site seems to have replicated over nicely. I am trying to set it for some testing with the dev team here before I can confirm its working.
And I didn't understand the DB question, do sites have databases too?

Sharad
0
 
ajmehtaCommented:
If it's a web application, oftentimes you have user accounts or other data that you may have in SQL or other database.  it's possible that you used a local Access DB or something else, but you'll need to check.
0
 
sharad_raiAuthor Commented:
This site in fact runs an app/api that connects to one of our SQL clusters. I think Devs will provision about how to test this piece on the server.
Thanks,
0
 
ajmehtaCommented:
In that case, be careful testing, because your TEST site is connecting to LIVE data/api's
0
 
bepsoccer1Commented:
Your connection strings should be in the root web.config.  You will need to change them to point to different databases should you not want to test with live data.
0
 
sharad_raiAuthor Commented:
I have let the devs know about it - thanks,
0
 
sharad_raiAuthor Commented:
I eventually exported and imported the site from production to a test server couple of days ago to run in parallel with the production site using web deploy tool. Incidentally, the production site is down and has been down without any one noticing it and my question is: "does the tool break the source site during backup/restore process?

the test site is up however...
0
 
ajmehtaCommented:
it shouldn't... but you could restart the app pool and website in IIS
0
 
sharad_raiAuthor Commented:
This solution alone was enough for me to accomplish what I wanted to achieve. Other suggestions were good but not directly applicable to this issue.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 9
  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now