feat: 实现数据库备份与恢复

This commit is contained in:
kanzihuang
2023-12-27 22:59:20 +08:00
committed by wanli
parent 1a7d425f60
commit e344722794
92 changed files with 5997 additions and 69 deletions

View File

@@ -2,7 +2,7 @@ package entity
import "mayfly-go/pkg/model"
// 数据库实例查询
// InstanceQuery 数据库实例查询
type InstanceQuery struct {
Id uint64 `json:"id" form:"id"`
Name string `json:"name" form:"name"`
@@ -33,3 +33,38 @@ type DbSqlExecQuery struct {
CreatorId uint64
}
// DbBackupQuery 数据库备份任务查询
type DbBackupQuery struct {
Id uint64 `json:"id" form:"id"`
DbName string `json:"dbName" form:"dbName"`
IntervalDay int `json:"intervalDay" form:"intervalDay"`
InDbNames []string `json:"-" form:"-"`
DbInstanceId uint64 `json:"-" form:"-"`
Repeated bool `json:"repeated" form:"repeated"` // 是否重复执行
}
// DbBackupHistoryQuery 数据库备份任务查询
type DbBackupHistoryQuery struct {
Id uint64 `json:"id" form:"id"`
DbBackupId uint64 `json:"dbBackupId" form:"dbBackupId"`
DbId string `json:"dbId" form:"dbId"`
DbName string `json:"dbName" form:"dbName"`
InDbNames []string `json:"-" form:"-"`
DbInstanceId uint64 `json:"dbInstanceId" form:"dbInstanceId"`
}
// DbRestoreQuery 数据库备份任务查询
type DbRestoreQuery struct {
Id uint64 `json:"id" form:"id"`
DbName string `json:"dbName" form:"dbName"`
InDbNames []string `json:"-" form:"-"`
DbInstanceId uint64 `json:"-" form:"-"`
Repeated bool `json:"repeated" form:"repeated"` // 是否重复执行
}
// DbRestoreHistoryQuery 数据库备份任务查询
type DbRestoreHistoryQuery struct {
Id uint64 `json:"id" form:"id"`
DbRestoreId uint64 `json:"dbRestoreId" form:"dbRestoreId"`
}