【 使用环境 】测试环境
【 OB or 其他组件 】
【 使用版本 】4.2.4.0
【问题描述】OB arch 日志越来越大,按照官方文档配置清理策略不生效
【复现路径】问题出现前后相关操作
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
你发一下 你的配置
可以发下备份清理策略,以及当前目录里时间最久的文件是哪一天
MySQL [(none)]> SELECT * FROM oceanbase.CDB_OB_BACKUP_DELETE_POLICY;
±----------±------------±----------------+
| TENANT_ID | POLICY_NAME | RECOVERY_WINDOW |
±----------±------------±----------------+
| 1002 | default | 3d |
| 1004 | default | 3d |
| 1006 | default | 3d |
±----------±------------±----------------+
3 rows in set (0.01 sec)
是这个配置吗?
select * from oceanbase.CDB_OB_ARCHIVELOG \G
*************************** 1. row ***************************
TENANT_ID: 1002
DEST_ID: 1001
ROUND_ID: 1
INCARNATION: 1
DEST_NO: 0
STATUS: DOING
START_SCN: 1736825268282172000
START_SCN_DISPLAY: 2025-01-14 11:27:48.282172
CHECKPOINT_SCN: 1736857599769277004
CHECKPOINT_SCN_DISPLAY: 2025-01-14 20:26:39.769277
COMPATIBLE: 1
BASE_PIECE_ID: 1
USED_PIECE_ID: 1
PIECE_SWITCH_INTERVAL: 86400000000
UNIT_SIZE: 1
COMPRESSION: none
INPUT_BYTES: 186855043
INPUT_BYTES_DISPLAY: 178.20MB
OUTPUT_BYTES: 186855043
OUTPUT_BYTES_DISPLAY: 178.20MB
COMPRESSION_RATIO: 1.00
DELETED_INPUT_BYTES: 0
DELETED_INPUT_BYTES_DISPLAY: 0.00MB
DELETED_OUTPUT_BYTES: 0
DELETED_OUTPUT_BYTES_DISPLAY: 0.00MB
COMMENT:
PATH: file:///data/obbackup/ob_dev_c/1726227792/tenant_incarnation_1/1002/clog
*************************** 2. row ***************************
TENANT_ID: 1004
DEST_ID: 1001
ROUND_ID: 1
INCARNATION: 1
DEST_NO: 0
STATUS: DOING
START_SCN: 1736825267859600000
START_SCN_DISPLAY: 2025-01-14 11:27:47.859600
CHECKPOINT_SCN: 1736857683844863000
CHECKPOINT_SCN_DISPLAY: 2025-01-14 20:28:03.844863
COMPATIBLE: 1
BASE_PIECE_ID: 1
USED_PIECE_ID: 1
PIECE_SWITCH_INTERVAL: 86400000000
UNIT_SIZE: 1
COMPRESSION: none
INPUT_BYTES: 437327678
INPUT_BYTES_DISPLAY: 417.07MB
OUTPUT_BYTES: 437327678
OUTPUT_BYTES_DISPLAY: 417.07MB
COMPRESSION_RATIO: 1.00
DELETED_INPUT_BYTES: 0
DELETED_INPUT_BYTES_DISPLAY: 0.00MB
DELETED_OUTPUT_BYTES: 0
DELETED_OUTPUT_BYTES_DISPLAY: 0.00MB
COMMENT:
PATH: file:///data/obbackup/ob_dev_c/1726227792/tenant_incarnation_1/1004/clog
*************************** 3. row ***************************
TENANT_ID: 1006
DEST_ID: 1002
ROUND_ID: 2
INCARNATION: 1
DEST_NO: 0
STATUS: DOING
START_SCN: 1736825268071694000
START_SCN_DISPLAY: 2025-01-14 11:27:48.071694
CHECKPOINT_SCN: 1736857574245495000
CHECKPOINT_SCN_DISPLAY: 2025-01-14 20:26:14.245495
COMPATIBLE: 1
BASE_PIECE_ID: 119
USED_PIECE_ID: 119
PIECE_SWITCH_INTERVAL: 86400000000
UNIT_SIZE: 1
COMPRESSION: none
INPUT_BYTES: 1484085632
INPUT_BYTES_DISPLAY: 1.38GB
OUTPUT_BYTES: 1484085632
OUTPUT_BYTES_DISPLAY: 1.38GB
COMPRESSION_RATIO: 1.00
DELETED_INPUT_BYTES: 0
DELETED_INPUT_BYTES_DISPLAY: 0.00MB
DELETED_OUTPUT_BYTES: 0
DELETED_OUTPUT_BYTES_DISPLAY: 0.00MB
COMMENT:
PATH: file:///data/obbackup/ob_dev_c/1726227792/tenant_incarnation_1/1006/clog
3 rows in set (0.03 sec)
ocp 中备份策略路径是 /data/obbackup 路径,但是我要清理的路径是 /home/admin/ob_dev_c/oceanbase/arch_log
最近是13号
麻烦在ocp上看下备份策略里面的调度配置
这是在OceanBase的安装目录下的,随便进入一个文件夹看下内容
集群之前备份在这个目录下吗,然后更换了新的目录进行备份。看文件时间是2024年9月份的
你是在ocp上配置的集群级备份是吧?在ocp上配置的备份 备份目录和归档日志目录 上层目录是一样的,
你这里看归档目录应该是 //data/obbackup/ob_dev_c/1726227792/tenant_incarnation_1/xxx/clog
确认下这个目录 /home/admin/ob_dev_c/oceanbase/arch_log 是否在增长
确认下备份是否成功的
SELECT * FROM oceanbase.DBA_OB_BACKUP_JOB_HISTORY order by START_TIMESTAMP desc limit 10\G;
之前用的ocp-express,不支持备份。所以之前没开启备份
/home/admin/ob_dev_c/oceanbase/arch_log 这个目录没有在增长了
MySQL [(none)]> SELECT * FROM oceanbase.DBA_OB_BACKUP_JOB_HISTORY order by START_TIMESTAMP desc limit 10\G;
*************************** 1. row ***************************
JOB_ID: 6
INCARNATION: 1
BACKUP_SET_ID: 0
INITIATOR_TENANT_ID: 1
INITIATOR_JOB_ID: 6
EXECUTOR_TENANT_ID: 1004
PLUS_ARCHIVELOG: OFF
BACKUP_TYPE: INC
JOB_LEVEL: CLUSTER
ENCRYPTION_MODE: NONE
PASSWD:
START_TIMESTAMP: 2025-01-15 04:00:09.499734
END_TIMESTAMP: 2025-01-15 04:02:09.573348
STATUS: COMPLETED
RESULT: 0
COMMENT:
DESCRIPTION: ALTER BACKUP CLUSTER INCREMENTAL_BACKUP BY SCHEDULED AT 2025-01-15 04:00:07.0
PATH:
*************************** 2. row ***************************
JOB_ID: 5
INCARNATION: 1
BACKUP_SET_ID: 0
INITIATOR_TENANT_ID: 1
INITIATOR_JOB_ID: 5
EXECUTOR_TENANT_ID: 1002
PLUS_ARCHIVELOG: OFF
BACKUP_TYPE: INC
JOB_LEVEL: CLUSTER
ENCRYPTION_MODE: NONE
PASSWD:
START_TIMESTAMP: 2025-01-15 04:00:09.367862
END_TIMESTAMP: 2025-01-15 04:02:39.598369
STATUS: COMPLETED
RESULT: 0
COMMENT:
DESCRIPTION: ALTER BACKUP CLUSTER INCREMENTAL_BACKUP BY SCHEDULED AT 2025-01-15 04:00:07.0
PATH:
*************************** 3. row ***************************
JOB_ID: 4
INCARNATION: 1
BACKUP_SET_ID: 0
INITIATOR_TENANT_ID: 1
INITIATOR_JOB_ID: 4
EXECUTOR_TENANT_ID: 1006
PLUS_ARCHIVELOG: OFF
BACKUP_TYPE: INC
JOB_LEVEL: CLUSTER
ENCRYPTION_MODE: NONE
PASSWD:
START_TIMESTAMP: 2025-01-15 04:00:09.142695
END_TIMESTAMP: 2025-01-15 04:03:39.613392
STATUS: COMPLETED
RESULT: 0
COMMENT:
DESCRIPTION: ALTER BACKUP CLUSTER INCREMENTAL_BACKUP BY SCHEDULED AT 2025-01-15 04:00:07.0
PATH:
*************************** 4. row ***************************
JOB_ID: 3
INCARNATION: 1
BACKUP_SET_ID: 0
INITIATOR_TENANT_ID: 1
INITIATOR_JOB_ID: 3
EXECUTOR_TENANT_ID: 1004
PLUS_ARCHIVELOG: OFF
BACKUP_TYPE: FULL
JOB_LEVEL: CLUSTER
ENCRYPTION_MODE: NONE
PASSWD:
START_TIMESTAMP: 2025-01-14 11:30:21.368613
END_TIMESTAMP: 2025-01-14 11:32:21.447324
STATUS: COMPLETED
RESULT: 0
COMMENT:
DESCRIPTION: ALTER BACKUP CLUSTER FULL_BACKUP BY BACKUP_NOW AT 2025-01-14 11:30:20.0
PATH:
*************************** 5. row ***************************
JOB_ID: 2
INCARNATION: 1
BACKUP_SET_ID: 0
INITIATOR_TENANT_ID: 1
INITIATOR_JOB_ID: 2
EXECUTOR_TENANT_ID: 1002
PLUS_ARCHIVELOG: OFF
BACKUP_TYPE: FULL
JOB_LEVEL: CLUSTER
ENCRYPTION_MODE: NONE
PASSWD:
START_TIMESTAMP: 2025-01-14 11:30:21.264564
END_TIMESTAMP: 2025-01-14 11:32:51.469628
STATUS: COMPLETED
RESULT: 0
COMMENT:
DESCRIPTION: ALTER BACKUP CLUSTER FULL_BACKUP BY BACKUP_NOW AT 2025-01-14 11:30:20.0
PATH:
*************************** 6. row ***************************
JOB_ID: 1
INCARNATION: 1
BACKUP_SET_ID: 0
INITIATOR_TENANT_ID: 1
INITIATOR_JOB_ID: 1
EXECUTOR_TENANT_ID: 1006
PLUS_ARCHIVELOG: OFF
BACKUP_TYPE: FULL
JOB_LEVEL: CLUSTER
ENCRYPTION_MODE: NONE
PASSWD:
START_TIMESTAMP: 2025-01-14 11:30:21.132306
END_TIMESTAMP: 2025-01-14 11:33:51.487517
STATUS: COMPLETED
RESULT: 0
COMMENT:
DESCRIPTION: ALTER BACKUP CLUSTER FULL_BACKUP BY BACKUP_NOW AT 2025-01-14 11:30:20.0
PATH:
6 rows in set (0.03 sec)
/home/admin/ob_dev_c/oceanbase/arch_log 这个目录没有在增长了
手动清理掉就可以了