!100 定时清理数据库备份数据

* feat: 优化数据库 BINLOG 同步机制
* feat: 删除数据库实例前需删除关联的数据库备份与恢复任务
* refactor: 重构数据库备份与恢复模块
* feat: 定时清理数据库备份历史和本地 Binlog 文件
* feat: 压缩数据库备份文件
This commit is contained in:
kanzihuang
2024-02-06 07:16:56 +00:00
committed by Coder慌
parent eee08be2cc
commit f2b6e15cf4
51 changed files with 572 additions and 305 deletions

View File

@@ -25,10 +25,13 @@ func InitIoc() {
func Init() {
sync.OnceFunc(func() {
if err := GetDbBackupApp().Init(); err != nil {
panic(fmt.Sprintf("初始化 dbBackupApp 失败: %v", err))
panic(fmt.Sprintf("初始化 DbBackupApp 失败: %v", err))
}
if err := GetDbRestoreApp().Init(); err != nil {
panic(fmt.Sprintf("初始化 dbRestoreApp 失败: %v", err))
panic(fmt.Sprintf("初始化 DbRestoreApp 失败: %v", err))
}
if err := GetDbBinlogApp().Init(); err != nil {
panic(fmt.Sprintf("初始化 DbBinlogApp 失败: %v", err))
}
GetDataSyncTaskApp().InitCronJob()
})()