Hildesheim
Hildesheim

Reputation: 161

msdeploy create package for manual deployment

I'm pretty new to msdeploy, but I would like use it to create a package/zip file containing only the files of a website that have been changed.

I cannot use msdeploy to deploy the files directly since I don't have access to installing Web Deploy on the production server. That's why I need to get a zip file, which I can copy to the production server and unzip manually to replace the changed files (not optimal I know).

If I run the following command, I get a textual output of which files are to be added/update/deleted:

    "c:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" ^
-verb:sync ^
-source:contentPath="D:\MyProject" ^
-dest:contentPath="MySite",ComputerName="https://MyServer/MsDeploy.axd?site=MySite",UserName="MyUsername",Password="MyPassword",AuthType="Basic" ^
-whatif ^

Is there any way of having msdeploy save this output to a zip file/package rather than just printing it?

The IIS version is 7, if that makes a difference.

Upvotes: 4

Views: 4279

Answers (1)

BilalAlam
BilalAlam

Reputation: 1227

With MSDeploy you can set the destination to be a ZIP package that can be used as the source for a sync once you have copied the ZIP file to the destination.

msdeploy.exe -verb:sync -source:contentPath="d:\myProject" -dest:package="c:\myZipFile.zip"

Unfortunately it will NOT just copy the changed files (that is problematic in general since it would need to create "deleted-stubs" so that it knows if any files were to be deleted. The command above will copy all the files for the site.

MSDeploy is incremental, but only in its ability to sync the destination with the given source. So if you were to repeat the above command after changing d:\myProject in a small way, you will see output indicating only the incremental diff. But the destination will still be the entire d:\myProject copy.

Sorry I don't have a better answer.

Upvotes: 3

Related Questions