I have a zip file on source server in a shared location and, using msdeploy, I would like to copy it to the destination server. However, if for the first time, the site does not exist on the destination server, then it should create the website as well. Both source and destination servers are IIS 6.0 on Windows Server 2003.
I have tried using different combination of providers e.g.
msdeploy.exe -verb:sync -source:package="\\SourceServer\WebSites\Site1.zip" -dest:metakey="Site1"
I am getting the following message:
Error: Source (contentPath) and destination (metaKey) are not compatible for the given operation.
I have also tried creating the website on the destination first from the default website, then copy the files across, but then I don't know how to make the new website Site1 point to this new directory:
msdeploy.exe -verb:sync -source:metakey="Default Web Site" -dest:metakey="Site1"
msdeploy.exe -verb:sync -source:package="\\SourceServer\WebSites\Site1.zip" -dest:contentpath="\\DesitnationServer\WebSites\Site1"
Even if I follow the above steps, I do not want to perform step 1 and 2 everytime I deploy Site1.
I am sure there must be an easy way to do this? Any idea?
Problems!
There's a walkthrough of what you want to do here. Give that a try!
(Skip to the bottom-most section for the bit that most closely resembles what you're trying to do: "Optional - Synchronize your site to the target by using a package file")