IIS backup Disaster action plan

                                                                                                                                                                                                                                   kick it on DotNetKicks.com

      Hi this is Satalaj, in this article we will see how to replicate old windows server to new windows server during disaster or maintenance situation.
Below are the some useful steps.
1. IIS backup.
2. Host File.
3. MS SQL Server network utility.

IIS Backup
    We need to first copy the physical folders to new server and create same folder structure like
old server.
   It is very difficult to remember the names of virtual directory. IIS is providing facility to backup
the Meta base data (xml file) where it has stored the pats of folder mapping. Below figures are self explanatory.
We will take Application Pools backup and save it as C:\IIS_Backup\ApplicationPool .


 

Fig.1.


Fig.2.

Same way we will take web applications backup.


 


Fig.3.

save configuration file as c:\IIS_BACKUP\WebApps

 

Fig.4.

That’s it. Now, assume that we have created same directory structure on new server. Moved ApplicationPool.xml and webapps.xml there. You can edit the webapps.xml and replace the Drive names if changed.

Let’s look at the brand new windows server. There we will be restoring these xml files

Fig.5.

We will store application pools from ApplicationPool.XML file

Fig.6.

Fig.7.

Fig.8.

Repeat the same procedure and load all other application pools.
Do same thing for Web sites. And select \ or default web to restore all in one shot.

Fig.9.
and Start The IIS server .

HOST FILE
by editing host file Ip entry you can resolve the domain to IP addresses if DNS failed to resolve or taking more than 1-24 hrs to resolve.
Host file can be found at
C:\Windows\system32\Drivers\etc\Hosts. 
edit and add entry like this
e.g
192.168.1.2  www.google.com

Now hit the google.com or ping it will resolve to 192.168.1.2

MS SQL SERVER  
            CLICONFG

Use Sql server network utility we can route the traffic to new sql server without changing
any application configuration.

 

Fig.1.

Fig.2.

Click add then click on TCP/IP
If you have used TCP/IP to access SQL server in your web Applications
e.g
All applications are accessing SQL server using IP 192.168.1.1
now let’s say it is changed to 192.168.1.2. Below fig shows how to configure application server to use new IP instead of doing changes in all web.config / app.config or any hardcoded IP.

Fig.3.
If applications are accessing SQL using domain use Named Pipes

Thanks for your time.

Satalaj

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.