开发者

MSDeploy preserve site name and IP address on Destination

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 I开发者_Python百科P 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?


I had this same problem today, but using this line would work for your situation:

msdeploy -verb:sync -source:metaKey=lm/w3svc/1094372159 -dest:metaKey=lm/w3svc/2126524491,computerName=web-iis2bl -replace:objectName=metaProperty,scopeAttributeName=name,scopeAttributeValue=ServerBindings,targetAttributeName=value,match=10.6.0.93,replace=10.6.0.93

It looks like the objectName=binding only works with IIS7.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜