Repository navigation
feat(backup): 支持 Linux 和 Windows SQL Server VDI 备份 - #154
Merged
Merged
Conversation
新增共享的 SQL Server runner 与原生 VDI 组件,接入备份和恢复流程。 要求 SQL 命令与媒体传输同时成功,处理取消、失败清理和 TLS/实例配置。 补齐前端配置、中英文文档、模拟协议测试及可选真实实例验收测试。 Refs #153
Awuqing
marked this pull request as ready for review
September 24, 2026 10:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更
Closes #153
新增 SQL Server VDI 备份与恢复类型。执行节点安装原生
backupx-sqlvdi组件后,可通过现有任务、存储上传和恢复流程处理 SQL Server 原生.bak;支持 Linux 和 Windows 的组件构建及部署配置。COPY_ONLY, CHECKSUM完整备份。必须同时收到 SQL 命令成功与 VDI 文件传输成功,才交付备份产物;失败和取消会终止关联操作并清理临时文件。范围与限制
VDI 执行节点必须与 SQL Server 共享主机及共享内存环境,使用具有
sysadmin权限的 SQL 登录。任务绑定固定节点,仅连接本机回环地址;不支持节点池、自动验证演练、事务日志或差异备份。Windows Agent 需手动部署。恢复使用
RESTORE DATABASE ... WITH CHECKSUM,保留 SQL Server 的覆盖保护,不使用REPLACE,不强制断开业务连接或重写文件位置。验证
基于最新
main(d26dbaf)执行,使用 Go 1.26.5、Node.js 24.11.1、npm 11.6.2:make verify-server:gofmt、依赖校验、go vet、全量 Go 测试及构建。make verify-web:lint、格式检查、45 项测试、类型检查及生产构建。make verify-docs:类型检查、中英文生产构建与严格断链检查。go test -race ./internal/backup -run SQLServer -count=1 -v:生命周期、失败清理、协议错误、SQL 连接无响应时取消;真实实例测试按默认配置跳过。原生组件 7 个模拟协议场景:成功、旧协议、恢复、失败、未知命令、取消、创建失败。
Go 主程序 Linux/amd64、Windows/amd64 交叉编译,Windows VDI 组件使用 MinGW 交叉编译。
GitHub CI:Go 全量构建测试、Windows 全量构建测试、React、文档和容器构建全部通过。
CodeQL:Go、JavaScript/TypeScript、Actions 分析及汇总检查通过。
前三项覆盖
make verify的全部子目标。前端构建保留现有体积提示;Windows SDK 头文件存在上游#endif标签编译警告。合并前验收
Linux 和 Windows 的真实实例验收项已在本 PR 中勾选完成。本次合并核验确认 CI、CodeQL 全部通过;代理未重新执行真实实例测试,真实实例验收状态以维护者填写的清单为准。
TestSQLServerVDIRoundTrip,确认备份、恢复、数据校验及DBCC CHECKDB。两种平台的部署前提及验收命令见新增
features/sql-server文档。按维护者的合并请求转为 Ready;合并后由 GitHub 自动关闭 #153。