diff --git a/dbm-ui/backend/ticket/builders/sqlserver/sqlserver_rollback.py b/dbm-ui/backend/ticket/builders/sqlserver/sqlserver_rollback.py index 318e440f6f..763bb1677c 100644 --- a/dbm-ui/backend/ticket/builders/sqlserver/sqlserver_rollback.py +++ b/dbm-ui/backend/ticket/builders/sqlserver/sqlserver_rollback.py @@ -109,7 +109,8 @@ def format_ticket_data(self): current_time = datetime.now(timezone.utc) # 获取最近的一次日志备份记录的时间点 last_time = str2datetime(SQLServerRollbackHandler(cluster_id).query_last_log_time(current_time)) - if last_time < restore_time: + # 如果最近一次日志备份记录的时间大于等于回滚时间 则不需要备份 + if last_time >= restore_time: continue backup_dbs = ClusterServiceHandler(self.ticket.bk_biz_id).get_dbs_for_drs(