You can query views for the backup history.
View the backup history in views
Log on to the
systenant of a cluster as therootuser.View the data backup history.
Example:
obclient> SELECT * FROM oceanbase.CDB_OB_BACKUP_JOB_HISTORY\G *************************** 1. row *************************** TENANT_ID: 1 JOB_ID: 1 INCARNATION: 1 BACKUP_SET_ID: 0 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 1 EXECUTOR_TENANT_ID: 1002 PLUS_ARCHIVELOG: OFF BACKUP_TYPE: D JOB_LEVEL: CLUSTER ENCRYPTION_MODE: NONE PASSWD: START_TIMESTAMP: 2022-06-01 16:54:25.940040 END_TIMESTAMP: 2022-06-01 16:56:03.779662 STATUS: COMPLETED RESULT: 0 COMMENT: DESCRIPTION: PATH: *************************** 2. row *************************** TENANT_ID: 1002 JOB_ID: 1 INCARNATION: 1 BACKUP_SET_ID: 1 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 1 EXECUTOR_TENANT_ID: 1002 PLUS_ARCHIVELOG: OFF BACKUP_TYPE: D JOB_LEVEL: USER_TENANT ENCRYPTION_MODE: NONE PASSWD: START_TIMESTAMP: 2022-06-01 16:54:26.007298 END_TIMESTAMP: 2022-06-01 16:56:03.629399 STATUS: COMPLETED RESULT: 0 COMMENT: DESCRIPTION: PATH: file:///data/nfs/backup/data obclient> SELECT * FROM oceanbase.CDB_OB_BACKUP_TASK_HISTORY\G *************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 1 JOB_ID: 1 INCARNATION: 1 BACKUP_SET_ID: 1 START_TIMESTAMP: 2022-06-01 16:54:26.007298 END_TIMESTAMP: 2022-06-01 16:56:03.576909 STATUS: COMPLETED START_SCN: 1658739252505427433 END_SCN: 1658739352813474497 USER_LS_START_SCN: 1658739274182399688 ENCRYPTION_MODE: NONE PASSWD: INPUT_BYTES: 567650229 OUTPUT_BYTES: 567650229 OUTPUT_RATE_BYTES: 5817899.8889 EXTRA_META_BYTES: 0 TABLET_COUNT: 1285 FINISH_TABLET_COUNT: 1285 MACRO_BLOCK_COUNT: 270 FINISH_MACRO_BLOCK_COUNT: 270 FILE_COUNT: 0 META_TURN_ID: 1 DATA_TURN_ID: 1 RESULT: 0 COMMENT: PATH: file:///data/nfs/backup/dataThe fields in the
oceanbase.CDB_OB_BACKUP_JOB_HISTORYview correspond to those in theoceanbase.CDB_OB_BACKUP_JOBSview. The fields in theoceanbase.CDB_OB_BACKUP_TASK_HISTORYview correspond to those in theoceanbase.CDB_OB_BACKUP_TASKSview. TheCOMMENTfield records the error information of a failed job or task.For more information about the
CDB_OB_BACKUP_JOB_HISTORYandCDB_OB_BACKUP_TASK_HISTORYviews, see CDB_OB_BACKUP_JOB_HISTORY and CDB_OB_BACKUP_TASK_HISTORY.View the backup sets.
obclient> SELECT * FROM oceanbase.CDB_OB_BACKUP_SET_FILES WHERE backup_set_id = 1 AND tenant_id = 1004\G *************************** 1. row *************************** TENANT_ID: 1002 BACKUP_SET_ID: 1 DEST_ID: 1001 INCARNATION: 1 BACKUP_TYPE: FULL PREV_FULL_BACKUP_SET_ID: 0 PREV_INC_BACKUP_SET_ID: 0 START_TIMESTAMP: 2022-06-01 16:54:26.007298 END_TIMESTAMP: 2022-06-01 16:56:03.576909 STATUS: SUCCESS FILE_STATUS: AVAILABLE ELAPSED_SECONDES: 469 PLUS_ARCHIVELOG: OFF START_REPLAY_SCN: 0 START_REPLAY_SCN_DISPLAY: MIN_RESTORE_SCN: 1662389318902587000 MIN_RESTORE_SCN_DISPLAY: 2022-06-01 16:55:03.902587 INPUT_BYTES: 567650229 OUTPUT_BYTES: 567650229 OUTPUT_RATE_BYTES: 5817899.8889 EXTRA_META_BYTES: 0 TABLET_COUNT: 1285 FINISH_TABLET_COUNT: 1285 MACRO_BLOCK_COUNT: 270 FINISH_MACRO_BLOCK_COUNT: 270 FILE_COUNT: 0 META_TURN_ID: 1 DATA_TURN_ID: 1 RESULT: 0 COMMENT: ENCRYPTION_MODE: NONE PASSWD: TENANT_COMPATIBLE: 4.0.0.0 BACKUP_COMPATIBLE: 0 PATH: file:///data/nfs/backup/dataFor more information about the
CDB_OB_BACKUP_SET_FILESview, see CDB_OB_BACKUP_SET_FILES.