TABLES
TABLES = ['td_log_sys_oper', 'td_log_user_login', 'td_log_sys_error', 'td_log_sys_denied', 'td_log_user_password']
清理对象:五张审计日志表(create_time 时间列)
审计日志保留期清理命令
职责:按保留天数(--days 覆盖,默认读站点配置 log.keep_days,未配置 180) 分批删除五张日志表的过期行——分批(1000 行/批)防长事务与锁表, 幂等可重复执行。
┌────────────────── 分区导航(按此顺序阅读)──────────────────┐ 分区 1 · 命令签名与说明 $signature / $description / 表清单 分区 2 · 执行入口 handle └────────────────────────────────────────────────────────────┘