refactor: 移除备份恢复功能(API/CLI/手册)
日志数据的保留与安全由对象存储 + 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:
1 parent
e07fe55c86
commit
f87fb4b2b3
11 files changed
+34
-552
No files matched your search
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user