优化空闲binlog轮转

This commit is contained in:
yml2213
2026-08-16 23:57:19 +08:00
parent f67ee12d72
commit a0bf47f2ed
3 changed files with 52 additions and 9 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ EOF
# 关闭包含 XtraBackup 位点的当前 binlog 并归档。全量备份只有在该文件
# 已有远端 complete 标识后才会被标记完成。
BACKUP_LOCK_WAIT_SECONDS=120 "${SCRIPT_DIR}/archive-binlog.sh" archive
BACKUP_LOCK_WAIT_SECONDS=120 "${SCRIPT_DIR}/archive-binlog.sh" archive --force
if ! find "${backup_dir}/binlog-state/${server_uuid}" -maxdepth 1 -type f \
-name "${binlog_file}.*.state" -print -quit | grep -q .; then
backup_error "XtraBackup 位点 ${binlog_file}:${binlog_pos} 尚未完成 binlog 归档"