在 Web Deploy 工具中设置自动备份 [英] Setting up automatic backups in Web Deploy tool

查看:40
本文介绍了在 Web Deploy 工具中设置自动备份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力设置自动备份,但似乎遇到了障碍.遵循此文档,并使用 Powershell,我已启用备份(TurnOn-Backups -On $true,然后 Configure-Backups -SiteName "test1" -Enabled $true; 所以 Get-BackupSettings -SiteName "test1" 告诉我备份已启用).

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 $true, then Configure-Backups -SiteName "test1" -Enabled $true; so Get-BackupSettings -SiteName "test1" tells me the backup is enabled).

但是,每当我从 Visual Studio 进行发布时,都不会创建备份.我已经设置了备份路径,权限设置为每个人都可以访问..所以我不知道我还能检查什么.

However, whenever I do a publish from Visual Studio - no backup is created. I've set the backup path, the permissions are set to allow everything for everyone.. so I have no idea what else I can check.

推荐答案

简短回答:目前在 VS 2010Web 一键发布"功能中已损坏.:'(

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

我花了将近一整周的时间与 MS 开发团队密切合作,并尝试了所有可以想象到的方法,但还没有找到不涉及 msdeploy.exe 命令实用程序的解决方案(即没有运气从 VS 执行此操作直接使用Web 一键发布"功能).:(

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). :(

希望他们在 VS 2010 SP1 中制作一个补丁来解决这个问题.支持 Web 部署(参见功能"部分)但自动备份功能是不是.我知道这不是你要找的答案,我也不是,但事情的可悲事实仍然如此.

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.

我认为此时您所能希望的最好的情况就是 Sayed 的回答 此处,虽然很旧,但目前仍然是唯一的解决方案(注意:旧 VS 2008 网站模板的 msbuild 选项卡现在是编译选项卡下的构建事件"在 VS 2010 Web App 项目中).这种方法的唯一缺点是每次编译时都会创建备份,而不仅仅是在部署时.否则,您将不得不编写一个在每次发布之前运行的特殊脚本.

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.

附带说明一下,您还可以使用配置编辑器"(必须安装管理角色)在服务器级别通过 IIS 管理器编辑您的 Web 部署配置.

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).

这篇关于在 Web Deploy 工具中设置自动备份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆