将IIS6的所有网站包括Application Pools全部迁移至IIS7.5

Source:Windows Server 2003 SP2,IIS6

Dest:Windows Server 2008 R2,IIS7.5

工具:

Web Deploy 2.0

下载链接:http://www.iis.net/download/webdeploy

实施:

1.检测II6依赖的组件和Application Pools

C:\Program Files\IIS\Microsoft Web Deploy V2>msdeploy -verb:getDependencies -source:webserver60

Info: Object configProtectedData (MSDeploy.webServer60/webServer60/machineConfig

32[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive ‘ConfigProtectedData’.

<OUTPUT>

<DEPENDENCYINFO>

<DEPENDENCIES>

<DEPENDENCY name=”AnonymousAuthentication” />

<DEPENDENCY name=”WindowsAuthentication” />

<DEPENDENCY name=”ISAPIFilter” />

<DEPENDENCY name=”ServerSideIncludeDisabled” />

<DEPENDENCY name=”AspNet2.0″ />

<DEPENDENCY name=”HttpCompressionStatic” />

<DEPENDENCY name=”HttpCompressionDynamic” />

</DEPENDENCIES>

<APPPOOLSINUSE>

<APPPOOLINUSE name=”DefaultAppPool” definitionIncluded=”True” />

<APPPOOLINUSE name=”M114″ definitionIncluded=”True” />

</APPPOOLSINUSE>

<ISAPIS>

<ISAPI enabled=”False” dll=”C:\WINDOWS\system32\inetsrv\httpodbc.dll” />

</ISAPIS>

</DEPENDENCYINFO>

</OUTPUT>

C:\Program Files\IIS\Microsoft Web Deploy V2>

dependency name后面的就是所需的组件,在目标机器上安装相关组件

apppoolInUse name后面的就是正在使用的Application Pools

2.IIS6导出所有网站:

msdeploy -verb:sync -source:webserver60 -dest:archivedir=d:\wwwroot,encryptPassword=password -whatif

msdeploy -verb:sync -source:webserver60 -dest:archivedir=d:\wwwroot,encryptPassword=password

备注:

webserver60表示IIS所有网站(含所有Application Pools)

encryptPassword=password表示有SSL网站时需使用

-whatif 表示只是检测有没有错误,并不会报错,如检测正常,即可去掉,就是导出了

3.IIS7.5导入所有网站:

msdeploy -verb:sync -source:archivedir=d:\wwwroot,encryptPassword=password -dest:webserver60 -whatif

msdeploy -verb:sync -source:archivedir=d:\wwwroot,encryptPassword=password -dest:webserver60

参考:

ssl参考:http://forums.iis.net/t/1156168.aspx

迁移参考:http://learn.iis.net/page.aspx/427/migrate-a-web-site-from-iis-60-to-iis-7-or-above/

03-14 06:41