Using IIS server in a Cluster, Server Farm or other Load Balanced Environment will take a lot of work to setup, transferring a site from old IIS server to a new IIS server can encounter different issue in the .net framework and etc. When upgrading IIS7 (Windows Server 2008) TO IIS 8 (Windows Server 2012 R2).
appcmd is a commandline utility who can export the entire IIS Website and App. pools configuration in XML format and also import the xml into another IIS instance.
Export the Application Pools Using appcmd Command line
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml
This command line will export all your application pools including the default in your webserver. Therefore you need to edit your appools.xml and remove the following contents that you do'nt need to import.
· DefaultAppPool
· Classic .NET AppPool
· SecurityTokenServiceApplicationPool
· .NET v2.0
· .NET v2.0 Classic
· .NET v4.5
· .NET v4.5 Classic
Import the Application Pools Using appcmd Command line
Copy the appools.xml file to your webserver and run this following command line. after that All the AppPools in the xml will be created on your second IIS server.
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml
Export All Website Using appcmd Command line
%windir%\system32\inetsrv\appcmd list site /config /xml > c:\websites.xml
This command line will export all website on you IIS Server, after exporting you need to edit the websites.xml and remove the Default Website as well as any other website you don't want to export to you new IIS Server or already exist on the target IIS instance, otherwise the import command line won't work
Import All Website Using appcmd Command line
Just like you did with the App Pools file, copy the websites.xml file to your webserver and run this following command line. after that All the website in the xml file will be created on your target IIS server.
%windir%\system32\inetsrv\appcmd add site /in < c:\websites.xml
No comments:
Post a Comment