Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I did notice this post but am looking for more specifics.

I have 2 servers running Windows 2008 Server Web Edition and am running websites on both of them. I would like to be able to mirror IIS settings onto each box from the other so that, in event of a 'server 1' crash, I can log into 'server 2' and quickly get all sites that were running on 'server 1' up and running. This isn't a simple mirror as I already have sites on 'server 2' that need to stay running, so basically I want to add the sites from 'server 1'.

I am sure I will get some comments about this, so yes, our servers can handle the increased load. I also want to stay away from discussing DNS so please let's not do that. I also realize I would need to add specific IPs to the 'server 2' network adapter and am fine with that as well so long as I can cut down on other manual tasks to get a better uptime and reduce manual errors.

Currently I am backing up databases and code on each box to the other, but as you can imagine restoring is a slow, manual and laborious process that is error prone.

I am looking for the ability to easily recover all settings that went with each site. For instance: SSL Certificates, IPs, physical path to the code for the site , bindings, handler mappings etc. I would hope to have all app pools restored too, just as they were on the other server with the correct framework version & pipeline mode.

As I understand it, the applicationHost.config houses most of this stuff. But if I am adding sites to a web server already running others I would assume that I couldn't replace this file since that would mean losing all of my current settings. I also am also not too keen on manually modding this file.

After looking around I found a release candidate of Microsoft's Web Deployment Tool (learn.iis.net/page.aspx/346/web-deployment-tool/). So finally, now that you have a bunch of background here comes the question:

Does anyone have any experience with quickly and (mostly) automatically adding sites to IIS 7 that is already running other sites? Has anyone done this with both "appcmd add backup" approach and [Web Deployment Tool][2] and if so what difficulties have you come up with?

share|improve this question
add comment

3 Answers

With IIS7, it gets MUCH easier. What you're looking for is "Shared configuration". You can set that at the global level on the server. With that, you can have hot-hot, or hot-warm like you described.

On the primary server, use "export" under shared configuration. That will save the server's Machine Key (different than ASP.NET's machineKey). That ensures that all encrypted data can be ready on the new server. It will also save applicationHost.config and administration.config. Once you do an import on the 2nd server, applicationHost.config and administration.config can (and should) be 100% the same between both servers.

So, you can use DFS-R to keep the configs 100% in sync automatically, or use something like robocopy to do it at regular intervals, depending on your favorite tool.

You don't need to point to a different path on your primary server either. Just use the export for the sake of the 2nd server.

The Web Deployment Tool is great, but for what you're talking about, Shared Configuration is a better fit.

It should be noted that certificates aren't stored in those files so you need to do them manually when you set them up, or use something else (like Web Deployment Tool) for keeping those in sync.

Another thing you can consider for an inexpensive but powerful load balancer is Microsoft's new ARR technology. (Application Request Routing)

share|improve this answer
    
Scott, thanks for the info! I looked into Shared Configuration but after testing it on some vmware instances this won't work for me. This is a GREAT tool for backing up IIS configuration for a server, but it directly mirrors ALL sites from another server and seems like it is only for server farms where you would have a server completely not in use just waiting for a failure. I need to have sites a-d on server 1 and e-z on server 2. If server 1 goes down, I need e-z to stay on server 2 but add sites a-d to server 2 (or vice versa). I don't think IIS Shared Configuration can do that –  Mario Sep 2 '09 at 18:29
    
Hi Mario. You're right that this is a full server level tool. It can't be done per site. However, if you're only talking about a few sites, and 3 servers, what you can do is setup shared configuration for all 3 servers and point the load balancer to whichever server you want. The non-used sites would just never get used. That gives you more flexibility in the future too, to go to the 3rd node if you need. However, if you need to go with single-site replication, Web Deployment Tool is well worth looking into for that. –  Scott Forsyth - MVP Sep 2 '09 at 22:39
add comment
up vote 2 down vote accepted

I ended up using Microsoft's Web Deployment Tool RC1 (MSDeploy). It is very granular and has a TON of options. It allows for backup and transfer per site. You can backup a site to a zip archive using command line or GUI, or you can sychronize/move a site to another server immediately (I think this uses web services to transfer and install everything). This tool keeps all your settings (bindings, ips, ssl certs, handler mappings etc.). You can look at dependencies (code in gac etc) and even move databases.

Restoration from an archive is a snap. I would recommend this tool for anyone looking to be able to recover sites quickly.

share|improve this answer
    
It works on IIS 6 too. Bonus! –  paulmorriss Jul 26 '11 at 15:32
    
Can you elaborate on what you did for this? –  jcolebrand Aug 27 '12 at 21:02
    
@jcolebrand, what were you looking for specifically? MS Web Deploy is a pretty big tool (as of the end of 2012 they are at 3.0) and requires a quite a bit of research and testing - I would say at least a few days. –  Mario Oct 24 '12 at 15:10
    
I ended up leaving that company, but I can tell you that I know more about MS Web Deploy than most people in my area, and I'm familiar with just how large it is. I just think that your answer above is rather vague, and I know how little documentation there is on it. I'm really not in that frame of mind anymore, so I'm not sure what was lacking at this point in time. –  jcolebrand Oct 24 '12 at 15:15
add comment

I know this is going to sound crazy, but why not move the databases to a third server and setup all the sites on both web servers so that all the sites are redundant?

share|improve this answer
    
Adding a third server in the mix makes this more complex and increases the chances that one hardware failure will affect all sites and is something I would like to stay away from. A solution with all sites on both servers would be problematic too as the sites have updates frequently and that would require the developers to push to both sites. I couldn't set up all the sites on both servers in a complete manner (i.e. ready to go) as some of the settings would not be able to be applied. I am guessing this solution would be more manual than I would like, as well as slower than I would like. –  Mario Aug 18 '09 at 15:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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