refactor: 移除备份恢复功能(API/CLI/手册)
CI / Backend (go vet + test) (push) Canceled after 0s
CI / Frontend (lint + build + test) (push) Canceled after 0s

日志数据的保留与安全由对象存储 + Loki retention 承担,平台侧整库备份恢复价值有限:
删除 services/backup.go、/system/{backup,restore,restore/apply,backups} 路由与 handler、
CLI backup/restore 子命令、前端 api 方法与类型;自检所需的 dataDirPath/密钥指纹并入 selfcheck;
用户手册删备份章节并修正 FAQ 升级建议;CHANGELOG 记录移除。
This commit is contained in:
opsx committed 2026-10-29 14:48:25 +08:00
1 parent e07fe55c86
commit f87fb4b2b3
11 files changed
+34 -552

No files matched your search

-31
View File
@@ -65,27 +65,6 @@ export interface SelfCheckResult {
items: SelfCheckItem[];
}
export interface BackupFile {
name: string;
sizeBytes: number;
createdAt: string;
}
export interface RestoreResult {
manifest: {
version: string;
createdAt: string;
dbBytes: number;
recordCount: number;
note: string;
};
keyMatches: boolean;
rowsInBackup: number;
currentRows: number;
stagedPath?: string;
warning?: string;
}
export const systemApi = {
// 审计
auditList: (params: AuditListParams = {}, opts?: { signal?: AbortSignal }) =>
@@ -99,16 +78,6 @@ export const systemApi = {
// 自检
selfCheck: () => http.get<SelfCheckResult>('/system/self-check'),
// 备份恢复
backups: () => http.get<{ list: BackupFile[] }>('/system/backups'),
restore: (file: File) => {
const form = new FormData();
form.append('file', file);
return http.post<RestoreResult>('/system/restore', form);
},
restoreApply: () =>
http.post<{ message: string; dbPath: string }>('/system/restore/apply', { confirm: true }),
// 平台数据保留期(告警发送历史 / 审计日志)
retention: () => http.get<RetentionSettings>('/settings/retention'),
saveRetention: (data: RetentionSettings) => http.put<RetentionSettings>('/settings/retention', data),