How do you migrate an IIS 7 site to another server?

前端 未结 7 2142
梦如初夏
梦如初夏 2020-12-22 16:59

I\'m wondering what is the best practice for moving a website to another server (along with all settings, etc.)

  • Manually recreate the site on the new server (n
7条回答
  •  情书的邮戳
    2020-12-22 17:40

    MSDeploy can migrate all content, config, etc. that is what the IIS team recommends. http://www.iis.net/extensions/WebDeploymentTool

    To create a package, run the following command (replace Default Web Site with your web site name):

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

    To restore the package, run the following command:

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

提交回复
热议问题