首批通过分布式安全可靠测评,为关键业务系统打造
OceanBase 物理备份介质空间满时处理流程
更新时间:2026-05-11 09:51
适用版本
OceanBase 数据库 V2.x 和 V3.x 版本。
问题描述
OceanBase 备份介质空间满,备份元数据落盘失败,日志备份中断,此时操作不当会导致备份卡住。相关日志如下:round 2 和 round 3 的状态不一致。
ERROR [SHARE] update (ob_log_archive_backup_info_mgr.cpp:148) [95706][710][YB420B20A85B-0005CFD25D8CB489] [lt=22] [dc=0] last status must be stop(ret=-4015, last={tenant_id:1, copy_id:0, start_ts:1662095457188483, checkpoint_ts:1663223393196723, status:3, incarnation:1, round:2, status_str:"DOING", is_mark_deleted:false, is_mount_file_created:false, compatible:1, backup_piece_id:0, start_piece_id:0}, status={tenant_id:1, copy_id:0, start_ts:1663244892775572, checkpoint_ts:0, status:4, incarnation:1, round:3, status_str:"STOPPING", is_mark_deleted:false, is_mount_file_created:false, compatible:1, backup_piece_id:0, start_piece_id:0}) BACKTRACE:0xd24fe9a 0x346c692 0x5039337 0x5039901 0x5fa5566 0x5ff3ec4 0x6005f7d 0x70849c7 0x7085a1e 0x5664f63 0xd1be396 0xd1bd33b 0x3b2fdd9 0x3b2fefc 0xd001127 0xcffee80 0xcffcc6f
问题原因
OceanBase 备份过程中,会在以下场景落盘元数据。
- 状态切换。比如 STOP、BEGINNING、DOING、STOPPING、INTERRUPTED 之间的转换。
- 位点推进过程中也会定时落盘。当介质空间满的时候,元数据落盘会失败。
解决方法
两种处理方法:
- 先扩容备份介质磁盘空间,再 stop archivelog;保证元数据落盘成功,最后重启日志归档恢复。
- stop archivelog,此时元数据丢失,需要替换备份介质磁盘目录重新开始备份,否则元数据不一致会导致备份卡住。