MSDeploy IIS7 同步 Web 服务器
我每晚使用以下 MSDeploy 命令将内容和设置从生产服务器提取到临时服务器。
msdeploy -verb:sync -source:webServer,wmsvc=xx.xx.xx.xx,username=xxxxx,password=xxxxxx,authType=basic -allowUntrusted=true -dest:webServer
如文档所述 此处“webServer”提供程序使用其他几个提供程序。有什么方法可以排除“machineConfig32”和“machineConfig64”链接提供程序的执行吗?
谢谢。
更新: 使用清单有效:
<sitemanifest>
<appHostConfig path="siteNameHere" />
<appHostSchema />
<contentPath path="siteNameHere" />
<rootWebConfig32 />
<rootWebConfig64 />
</sitemanifest>
使用 MSDeploy 命令: msdeploy" -verb:sync -source:manifest=d:\msdeploy\deploymanifest.xml,wmsvc=xx.xx.xx.xx,用户名=xxxxxx,密码=xxxxxx,authType=basic -allowUntrusted=true -dest:manifest= d:\msdeploy\deploymanifest.xml
I am using the following MSDeploy command to pull content and settings from a production server to a staging server nightly.
msdeploy -verb:sync -source:webServer,wmsvc=xx.xx.xx.xx,username=xxxxx,password=xxxxxx,authType=basic -allowUntrusted=true -dest:webServer
As documented here the "webServer" provider uses several other providers. Is there any way to exclude the "machineConfig32" and "machineConfig64" linked providers from being executed?
Thanks.
Updated:
Using a manifest works:
<sitemanifest>
<appHostConfig path="siteNameHere" />
<appHostSchema />
<contentPath path="siteNameHere" />
<rootWebConfig32 />
<rootWebConfig64 />
</sitemanifest>
with MSDeploy command:
msdeploy" -verb:sync -source:manifest=d:\msdeploy\deploymanifest.xml,wmsvc=xx.xx.xx.xx,username=xxxxxx,password=xxxxxx,authType=basic -allowUntrusted=true -dest:manifest=d:\msdeploy\deploymanifest.xml
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以通过将以下内容添加到命令行来从同步操作中跳过这些对象:
-skip:objectName=machineconfig32 -skip:objectName=machineConfig64
You can just skip those objects from the sync operation all together by adding the following to your command line:
-skip:objectName=machineconfig32 -skip:objectName=machineConfig64
此处介绍了您可以排除的链接扩展程序和这里:
我没有看到你的列在那里,但可能值得一试。有时这个 doco 已经过时了。
也就是说,您可能想尝试使用清单“建立”包容性较低的提供商,而不是“拆除”包容性的提供商。尝试以下链接获取信息..(包清单)
然后你可以有一个包命令,例如:(我的 IIS6 标准包命令,注意这不会完全像 IIS6 一样工作,只是提供一个示例)
-verb:sync -source:manifest=$manifestFile -dest:package=$appName.zip,encryptPassword=MyPassword -enableLink:AppPoolExtension -disableLink:CertificateExtension -disableLink:ContentExtension -declareParamFile:$parametersFile"
并部署:
-verb:sync -source:package=$appname.zip,encryptPassword=MyPassword -dest:auto -setParamFile=$appname_$computernamesetParameters.xml
在清单中,我有站点、内容目录、注册表位置我需要,甚至com组件之类的。
The linked extensions you can exclude are covered here and here:
I don't see yours listed there, but it may be worth a try. Sometimes this doco is out of date.
That said, you may want to try to "build up" less inclusive providers using manifests rather than "tearing down" an all-inclusive one. Try the following link for the info.. (package manifests)
Then you can have a package command like: (my IIS6 standard package command, note this won't work exactly as it's IIS6, just serving up an example)
-verb:sync -source:manifest=$manifestFile -dest:package=$appName.zip,encryptPassword=MyPassword -enableLink:AppPoolExtension -disableLink:CertificateExtension -disableLink:ContentExtension -declareParamFile:$parametersFile"
and deploy:
-verb:sync -source:package=$appname.zip,encryptPassword=MyPassword -dest:auto -setParamFile=$appname_$computernamesetParameters.xml
In the manifest I then have the site, the content directory, a registry location I need, and even com components and the like.
据我所知 - 没有直接的方法来排除链接的提供商。但是 - 您可以通过获取依赖项列表来同步各个提供程序。
As far as I know - there is no direct way to exclude linked providers. However - you can sync individual providers by getting the dependency list.