feat(restore): 恢复前默认为当前世界做安全快照并串接恢复 Job,快照失败则不恢复;并发恢复另一备份返回 409

This commit is contained in:
Lemon-miaow committed 2026-09-25 02:52:18 +08:00
1 parent d44243c0ac
commit 489eff4494
33 files changed
+1260 -105

No files matched your search

+7
View File
@@ -19,6 +19,13 @@ type AsyncJob struct {
Message string `json:"message,omitempty"`
StartedAt time.Time `json:"started_at,omitzero"`
FinishedAt time.Time `json:"finished_at,omitzero"`
// ThenRestore is set on a restore's safety snapshot (a backup Job): "pending"
// until the restore behind it starts ("started") or is given up
// ("abandoned", with a ChainAbandon* code in ThenRestoreReason and its
// English in Message). RestoreBackupID is the backup that restore extracts.
ThenRestore string `json:"then_restore,omitempty"`
ThenRestoreReason string `json:"then_restore_reason,omitempty"`
RestoreBackupID string `json:"restore_backup_id,omitempty"`
}
// JobStatusReader reads the newest backup/restore Jobs for a server, newest