windows 将 IIS 设置克隆到新服务器的最佳方法?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/686745/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 12:12:59  来源:igfitidea点击:

Best way to clone IIS settings to new server?

windowsiis

提问by chris

I have a number of asp and asp.net 2.0 applications that I need to move to a new Win2003 server.

我有许多 asp 和 asp.net 2.0 应用程序,我需要将它们移动到新的 Win2003 服务器。

I've created a test suite to verify that different aspects are installed and configured properly, but other than exporting the IIS metabase from the two servers and comparing manually, are there any tools or techniques I'm missing?

我已经创建了一个测试套件来验证不同方面的安装和配置是否正确,但除了从两台服务器导出 IIS 元数据库并手动比较之外,是否还有我遗漏的工具或技术?

采纳答案by mdb

The Microsoft Web Deployment Toolshould allow you to do pretty much what you want.

微软Web部署工具应该让你做很多你想要的东西。

From the linked web site:

从链接的网站:

The Web Deployment Tool is a tool for simplifying the deployment, management and migration of Web applications, sites and even entire servers. Developers can package a Web site, automatically including content, configuration, certificates and databases. These packages can be directly deployed to a server or packaged and shared with others. IT Professionals can enable developers to deploy these packages to a server and delegate access to non-admins. IT Professionals can also use the tool in their infrastructure to synchronize servers easily on both IIS 6.0 and IIS 7.0, or even to accomplish a migration from IIS 6.0 to IIS 7.0.

Web 部署工具是一种用于简化 Web 应用程序、站点甚至整个服务器的部署、管理和迁移的工具。开发人员可以打包一个网站,自动包括内容、配置、证书和数据库。这些包可以直接部署到服务器上,也可以打包后与他人共享。IT 专业人员可以让开发人员将这些包部署到服务器并将访问权限委托给非管理员。IT 专业人员还可以在其基础结构中使用该工具在 IIS 6.0 和 IIS 7.0 上轻松同步服务器,甚至完成从 IIS 6.0 到 IIS 7.0 的迁移。

When it comes to metabase edits, it allows you to easily get a list of all settings your site is dependent on, and sync these to the target server (complete with a handy 'what if' mode).

当涉及到元数据库编辑时,它允许您轻松获取站点所依赖的所有设置的列表,并将这些同步到目标服务器(完成一个方便的“假设”模式)。

回答by Richard

What version of IIS? (This will impact the extract steps.)

什么版本的IIS?(这将影响提取步骤。)

You can export settings from IIS manager and import.

您可以从 IIS 管理器导出设置并导入。

回答by danswain

If you're doing it manually then I'd use something like BeyondCompareto make your life easier.

如果您手动进行操作,那么我会使用BeyondCompare 之类的工具来让您的生活更轻松。

You could write some code using System.DirectoryService to programatically compare the two servers settings, or compare a given server against an Xml file have a look at this

您可以使用 System.DirectoryService 编写一些代码来以编程方式比较两个服务器的设置,或者将给定的服务器与 Xml 文件进行比较,看看这个

Look at the sdcextensions for MSBuild they let you create websites in a msbuild file so if you can verify that you can create it correctly you can just add that to your build script.

查看MSBuild的sdc扩展,它们允许您在 msbuild 文件中创建网站,因此如果您可以验证是否可以正确创建它,则只需将其添加到您的构建脚本中即可。

回答by MRFerocius

To use move your application to another IIS.

要使用将您的应用程序移动到另一个 IIS。

  • 1) First use ntbackup, and backaup the applicaton folder.
  • 2) Export the application configuration to a file in IIS.
  • 3) On the other server use the ntbackup command and then restore the files in the same path.
  • 4) Create the application from the config file.
  • 5) Adjust possible missed configurations.
  • 6 That's it.

    In our company we are migrating many .NET apps from our testing servers to productive ones, and we follow this guide.

  • 1)首先使用ntbackup,备份应用程序文件夹。
  • 2) 将应用程序配置导出到 IIS 中的文件。
  • 3)在另一台服务器上使用ntbackup命令,然后恢复相同路径下的文件。
  • 4) 从配置文件创建应用程序。
  • 5) 调整可能遗漏的配置。
  • 6 就是这样。

    在我们公司,我们正在将许多 .NET 应用程序从我们的测试服务器迁移到生产服务器,我们遵循本指南。

Best Regards!

此致!