Web Deployment Tool (MS Deploy)
Default Web Site Applications not being backed up Automatically
Last post May 14, 2019 09:54 AM by paul.hawkes
Apr 08, 2019 09:22 AM|paul.hawkes|LINK
I am using Jenkins to automatically deploy my sites to our production server using MSBuild. I have set EnableMSDeployBackup to True. I have also followed the instructions here https://docs.microsoft.com/en-us/iis/publish/using-web-deploy/web-deploy-automatic-backups
and here https://codeninjazblog.wordpress.com/2016/03/17/turning-on-automatic-backup-with-webdeploy/
My issue is that I have two Applications under the "Default Web Site" in IIS and their physical file paths do not reside under C:\inetpub\wwwroot they reside on another disk. When the automated MSBuild is triggered the Default site is backed up into the
zip file, but it is only the files that are located in C:\inetpub\wwwroot that are in the zip file.
Any help with this would be appreciated
Apr 09, 2019 05:14 AM|Jalpa Panchal|LINK
You could try below command to back up application of IIS:
msdeploy.exe -verb:sync -source:iisapp="website name/application name" -dest:package=back up file path
msdeploy.exe -verb:sync -source:iisapp="test2/api" -dest:package=D:\subapi.zip
Apr 09, 2019 08:01 AM|paul.hawkes|LINK
@Jalpa that's all fine and this seem to be the default answer for people experiencing similar issues to myself... but why does the backup process for "Default Web Site/Application Name"not work using the
automatic backup feature on the server. Is this a bug or am I missing something.
I am hoping the msdeploy.exe command can be triggered from my Jenkins application on a remote server??
May 14, 2019 07:03 AM|Jalpa Panchal|LINK
Could you share your script or setting how you back up child application?
May 14, 2019 09:54 AM|paul.hawkes|LINK
Jenkins has a build step "Build a Visual Studio project or solution using MSBuild" - where you point MSBuild at your solution file and the release.pubxml file and parameters - these are my command line argurments
these would be the relevent elements of release.pubxml
<DeployIisAppPath>Default Web Site/Child Site Name</DeployIisAppPath>