Johan Öbrink
Johan Öbrink

Reputation: 143

creating automatic backup when webdeploying

So what I want is that whenever i deploy from my dev-machine to the server-machine that an automatic backup of the current files for the site gets backuped.

I followed this guide for the configuration

http://www.iis.net/learn/publish/using-web-deploy/web-deploy-automatic-backups

At the root-level in IIS at the server this is configured

Configuration IIS

Using PowerShell on the server and calling

.\msdeploy.exe -verb:sync -source:backupManager -dest:backupManager=SiteName

will indeed create a backup of the site to the location D:\Websites\backups\SiteName_snapshots however no backup gets generated when I'm webdeploying from my dev-machine to the server.

I'm using Visual Studio 2012 for the publishing using a profile that is using an administrator account located at the targeted server.

According to this link:

Setting up automatic backups in Web Deploy tool

This feature seems broken in VS2010, is this still the case for VS2012?

Upvotes: 4

Views: 3349

Answers (2)

mkdabrowski
mkdabrowski

Reputation: 41

Be sure to set EnableMSDeployBackup to True in your *.pubxml file

   <Project>
    <PropertyGroup>
     ...
       <EnableMSDeployBackup>True</EnableMSDeployBackup>
     ...
    </PropertyGroup>
   </Project>

Upvotes: 4

Davi Ruiz
Davi Ruiz

Reputation: 120

I solved my problem by passing this parameter:

msbuild ... /p:EnableMSDeployBackup=true

Hope this helps

Upvotes: 1

Related Questions