MSDeploy 在目标上保留站点名称和 IP 地址
我有一个开发网站,我正在尝试将其同步到我的暂存环境。两台服务器都是运行 IIS6 的 Windows 2003。每当我运行同步命令时,目标站点名称和 IP 地址都会被我的开发站点的站点名称和 IP 地址覆盖。我想保留目的地的 IP 和站点名称。我读过我应该使用 -replace 和绑定所以 我尝试从开发环境运行以下脚本。
msdeploy -verb:sync -source:metakey=lm/w3svc/1094372159
-dest:metakey=lm/w3svc/2126524491,computername=web-iis2bl
-replace:objectName=binding,targetattributename=bindingInformation,
match=10.6.0.93,replace=10.6.0.119
但它仍然用 10.6.0.93 地址覆盖目标。然后我发现一些建议我可以“跳过”所有绑定的内容,因此我删除了 -replace 并进行了替换。
-skip:objectName=binding
还是没有爱。我需要什么语法来保留/跳过/不覆盖 IP 和站点名称?
I have a dev site that I am trying to sync to my staging environment. Both servers are Windows 2003 running IIS6. Whenever I run a sync command the destination site name and IP address are being overwritten with the site name and IP address of my dev site. I want to preserve the IP and site name on the destination. I've read that I'm supposed to use -replace and binding so
I tried running the following script from the dev environment.
msdeploy -verb:sync -source:metakey=lm/w3svc/1094372159
-dest:metakey=lm/w3svc/2126524491,computername=web-iis2bl
-replace:objectName=binding,targetattributename=bindingInformation,
match=10.6.0.93,replace=10.6.0.119
but it is still overwriting the target with the 10.6.0.93 address. I then found something that suggested I could "skip" all bindings so I removed the -replace and substituted.
-skip:objectName=binding
Still no love. What syntax do I need to preserve/skip/not overwrite the IP and site name?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我今天也遇到了同样的问题,但是使用这一行适合您的情况:
看起来
objectName=binding
仅适用于 IIS7。I had this same problem today, but using this line would work for your situation:
It looks like the
objectName=binding
only works with IIS7.