Setting up automatic backups in Web Deploy tool

前端 未结 2 789
执笔经年
执笔经年 2021-02-13 18:43

I\'ve been struggling to setup automatic backup, but seems to have hit a wall. Following this document, and using Powershell, I\'ve enabled the backups (TurnOn-Backups -On $

2条回答
  •  北荒
    北荒 (楼主)
    2021-02-13 18:57

    Short Answer: Currently broken in VS 2010 "Web One Click Publish" feature. :'(

    I spent nearly an entire week working closely with the MS Dev team and trying everything imaginable on this one and have yet to find a solution that doesn't involve the msdeploy.exe command utility (i.e. no luck for doing this from VS directly using the "Web One Click Publish" feature). :(

    Hopefully they make a patch to address this issue in VS 2010 SP1. Web Deploy is supported (See "Features" section) but the Automatic Backup feature is not. I know this isn't the answer you were looking for, nor was I, but the sad fact of the matter nevertheless.

    I think the best you can hope for at this point is as Sayed answered here, and while old, remains the only solution at this time (Note: The msbuild tab for the old VS 2008 Web Site template is now "Build Events" under the Compile tab in VS 2010 Web App projects). Only downside to this method is that it will create a backup every time you compile, not just when you deploy. Otherwise you'll have to write a special script that you run prior to each publish.

    On a side note, you can also edit your web deploy configuration via IIS Manager at the server level using the "Configuration Editor" (must have the Management role installed).

    enter image description here

提交回复
热议问题