Skip to content

Commit

Permalink
Merge pull request #2 from peterxucai/feat/backup_ticket_opti/#7906
Browse files Browse the repository at this point in the history
feat(backend): mysql、tendbcluster备份单据优化 #7906
  • Loading branch information
xfwduke authored Dec 5, 2024
2 parents 3d4e51e + 7ef4c17 commit de677bf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,5 @@ class MySQLDBTableBackupFlowParamBuilder(builders.FlowParamBuilder):
class TenDBHADBTableBackupFlowBuilder(BaseMySQLHATicketFlowBuilder):
serializer = MySQLDBTableBackupDetailSerializer
inner_flow_builder = MySQLDBTableBackupFlowParamBuilder
inner_flow_name = _("TenDBHA 库表备份执行")
inner_flow_name = _("MySQL 库表备份执行")
retry_type = FlowRetryType.MANUAL_RETRY
2 changes: 1 addition & 1 deletion dbm-ui/backend/ticket/builders/mysql/mysql_full_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ class MySQLFullBackupFlowParamBuilder(builders.FlowParamBuilder):
class TenDBHAFullBackupFlowBuilder(BaseMySQLHATicketFlowBuilder):
serializer = MySQLFullBackupDetailSerializer
inner_flow_builder = MySQLFullBackupFlowParamBuilder
inner_flow_name = _("TenDBHA 全库备份执行")
inner_flow_name = _("MySQL 全库备份执行")
retry_type = FlowRetryType.MANUAL_RETRY
5 changes: 1 addition & 4 deletions dbm-ui/backend/ticket/builders/tendbcluster/full_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ def __validate_cluster_status(attrs):
bad.append(cluster_obj.immute_domain)
elif (
backup_local in ["remote", "slave"]
and cluster_obj.storageinstance_set.filter(
backup_local,
is_stand_by=True,
)
and cluster_obj.storageinstance_set.filter(instance_inner_role=backup_local, is_stand_by=True)
.exclude(status=InstanceStatus.RUNNING)
.exists()
):
Expand Down
4 changes: 2 additions & 2 deletions dbm-ui/backend/ticket/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ def get_cluster_type_by_ticket(cls, ticket_type):
MYSQL_INSTANCE_CLONE_RULES = TicketEnumField("MYSQL_INSTANCE_CLONE_RULES", _("MySQL DB实例权限克隆"), _("权限管理"))
MYSQL_HA_RENAME_DATABASE = TicketEnumField("MYSQL_HA_RENAME_DATABASE", _("MySQL 高可用DB重命名"), _("集群维护"))
MYSQL_HA_TRUNCATE_DATA = TicketEnumField("MYSQL_HA_TRUNCATE_DATA", _("MySQL 高可用清档"), _("数据处理"))
MYSQL_HA_DB_TABLE_BACKUP = TicketEnumField("MYSQL_HA_DB_TABLE_BACKUP", _("TenDBHA 库表备份"), _("备份"))
MYSQL_HA_DB_TABLE_BACKUP = TicketEnumField("MYSQL_HA_DB_TABLE_BACKUP", _("MySQL 库表备份"), _("备份"))
MYSQL_SINGLE_DB_TABLE_BACKUP = TicketEnumField("MYSQL_SINGLE_DB_TABLE_BACKUP", _("TenDBSingle 库表备份"), _("备份"))
MYSQL_CHECKSUM = TicketEnumField("MYSQL_CHECKSUM", _("MySQL 数据校验修复"), _("数据处理"))
MYSQL_PARTITION = TicketEnumField("MYSQL_PARTITION", _("MySQL 分区"), _("分区管理"))
MYSQL_PARTITION_CRON = TicketEnumField("MYSQL_PARTITION_CRON", _("MySQL 分区定时任务"), register_iam=False) # noqa
MYSQL_DATA_REPAIR = TicketEnumField("MYSQL_DATA_REPAIR", _("MySQL 数据修复"), register_iam=False)
MYSQL_FLASHBACK = TicketEnumField("MYSQL_FLASHBACK", _("MySQL 闪回"), _("回档"))
MYSQL_ROLLBACK_CLUSTER = TicketEnumField("MYSQL_ROLLBACK_CLUSTER", _("MySQL 定点构造"), _("回档"))
MYSQL_HA_FULL_BACKUP = TicketEnumField("MYSQL_HA_FULL_BACKUP", _("TenDB HA全库备份"), _("备份"))
MYSQL_HA_FULL_BACKUP = TicketEnumField("MYSQL_HA_FULL_BACKUP", _("MySQL 全库备份"), _("备份"))
MYSQL_SINGLE_FULL_BACKUP = TicketEnumField("MYSQL_SINGLE_FULL_BACKUP", _("TenDB Single全库备份"), _("备份"))
MYSQL_SINGLE_TRUNCATE_DATA = TicketEnumField("MYSQL_SINGLE_TRUNCATE_DATA", _("MySQL 单节点清档"), _("数据处理"))
MYSQL_SINGLE_RENAME_DATABASE = TicketEnumField("MYSQL_SINGLE_RENAME_DATABASE", _("MySQL 单节点DB重命名"), _("集群维护")) # noqa
Expand Down

0 comments on commit de677bf

Please sign in to comment.