You can query views for the backup history.
View the data backup history in the sys tenant
Log on to the
systenant of the cluster as therootuser.View the data backup history.
View the job history
A job corresponds to an initiated backup.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_JOB_HISTORY\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 1 INCARNATION: 1 BACKUP_SET_ID: 1 INITIATOR_TENANT_ID: 1002 INITIATOR_JOB_ID: 0 EXECUTOR_TENANT_ID: 1002 PLUS_ARCHIVELOG: OFF BACKUP_TYPE: FULL JOB_LEVEL: USER_TENANT ENCRYPTION_MODE: NONE PASSWD: START_TIMESTAMP: 2024-01-31 11:20:59.804836 END_TIMESTAMP: 2024-01-31 11:23:08.773566 STATUS: COMPLETED RESULT: 0 COMMENT: DESCRIPTION: PATH: file:///data/nfs/backup/data *************************** 2. row *************************** TENANT_ID: 1002 JOB_ID: 2 INCARNATION: 1 BACKUP_SET_ID: 2 INITIATOR_TENANT_ID: 1002 INITIATOR_JOB_ID: 0 EXECUTOR_TENANT_ID: 1002 PLUS_ARCHIVELOG: OFF BACKUP_TYPE: INC JOB_LEVEL: USER_TENANT ENCRYPTION_MODE: NONE PASSWD: START_TIMESTAMP: 2024-01-31 13:47:57.218929 END_TIMESTAMP: 2024-01-31 13:50:14.985358 STATUS: COMPLETED RESULT: 0 COMMENT: DESCRIPTION: PATH: file:///data/nfs/backup/data 2 rows in setView the task history
A task corresponds to a backup set.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_TASK_HISTORY\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 1 JOB_ID: 1 INCARNATION: 1 BACKUP_SET_ID: 1 START_TIMESTAMP: 2024-01-31 11:20:59.804836 END_TIMESTAMP: 2024-01-31 11:23:08.762451 STATUS: COMPLETED START_SCN: 1706671262627179000 END_SCN: 1706671388756316000 USER_LS_START_SCN: 1706671278153636000 ENCRYPTION_MODE: NONE PASSWD: INPUT_BYTES: 198130272 OUTPUT_BYTES: 16984419 OUTPUT_RATE_BYTES: 131705.4367 EXTRA_META_BYTES: 0 TABLET_COUNT: 617 FINISH_TABLET_COUNT: 617 MACRO_BLOCK_COUNT: 94 FINISH_MACRO_BLOCK_COUNT: 94 FILE_COUNT: 0 META_TURN_ID: 1 DATA_TURN_ID: 0 RESULT: 0 COMMENT: PATH: file:///data/nfs/backup/data MINOR_TURN_ID: 1 MAJOR_TURN_ID: 1 *************************** 2. row *************************** TENANT_ID: 1002 TASK_ID: 2 JOB_ID: 2 INCARNATION: 1 BACKUP_SET_ID: 2 START_TIMESTAMP: 2024-01-31 13:47:57.218929 END_TIMESTAMP: 2024-01-31 13:50:14.974017 STATUS: COMPLETED START_SCN: 1706680089128492000 END_SCN: 1706680214967798000 USER_LS_START_SCN: 1706680104341550000 ENCRYPTION_MODE: NONE PASSWD: INPUT_BYTES: 42941657 OUTPUT_BYTES: 14592769 OUTPUT_RATE_BYTES: 105932.7043 EXTRA_META_BYTES: 0 TABLET_COUNT: 617 FINISH_TABLET_COUNT: 617 MACRO_BLOCK_COUNT: 20 FINISH_MACRO_BLOCK_COUNT: 20 FILE_COUNT: 0 META_TURN_ID: 1 DATA_TURN_ID: 0 RESULT: 0 COMMENT: PATH: file:///data/nfs/backup/data MINOR_TURN_ID: 1 MAJOR_TURN_ID: 1 2 rows in setThe columns in the
oceanbase.CDB_OB_BACKUP_JOB_HISTORYview correspond to those in theoceanbase.CDB_OB_BACKUP_JOBSview. The columns in theoceanbase.CDB_OB_BACKUP_TASK_HISTORYview correspond to those in theoceanbase.CDB_OB_BACKUP_TASKSview. TheCOMMENTcolumn 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 [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BACKUP_SET_FILES WHERE TENANT_ID = 1002 AND BACKUP_SET_ID = 1\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1002 BACKUP_SET_ID: 1 DEST_ID: 1002 INCARNATION: 1 BACKUP_TYPE: FULL PREV_FULL_BACKUP_SET_ID: 0 PREV_INC_BACKUP_SET_ID: 0 START_TIMESTAMP: 2024-01-31 11:20:59.804836 END_TIMESTAMP: 2024-01-31 11:23:08.762451 STATUS: SUCCESS FILE_STATUS: AVAILABLE ELAPSED_SECONDES: 129 PLUS_ARCHIVELOG: OFF START_REPLAY_SCN: 1706670992366131000 START_REPLAY_SCN_DISPLAY: 2024-01-31 11:16:32.366131 MIN_RESTORE_SCN: 1706671388756316000 MIN_RESTORE_SCN_DISPLAY: 2024-01-31 11:23:08.756316000 INPUT_BYTES: 198130272 OUTPUT_BYTES: 16984419 OUTPUT_RATE_BYTES: 131705.4367 EXTRA_META_BYTES: 0 TABLET_COUNT: 617 FINISH_TABLET_COUNT: 617 MACRO_BLOCK_COUNT: 94 FINISH_MACRO_BLOCK_COUNT: 94 FILE_COUNT: 0 META_TURN_ID: 1 DATA_TURN_ID: 0 RESULT: 0 COMMENT: ENCRYPTION_MODE: NONE PASSWD: TENANT_COMPATIBLE: 4.2.2.0 BACKUP_COMPATIBLE: 3 PATH: file:///data/nfs/backup/data CLUSTER_VERSION: 4.2.2.0 CONSISTENT_SCN: 1706671288404894000 MINOR_TURN_ID: 1 MAJOR_TURN_ID: 1 1 row in setFor more information about the
CDB_OB_BACKUP_SET_FILESview, see CDB_OB_BACKUP_SET_FILES.
View the data backup history in a user tenant
Log on to the database as a tenant administrator.
View the data backup history.
View the job history
A job corresponds to an initiated backup.
MySQL modeOracle modeHere is an example in MySQL mode:
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_JOB_HISTORY\GHere is an example in Oracle mode:
obclient [SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_TASK_HISTORY\GView the task history
A task corresponds to a backup set.
MySQL modeOracle modeHere is an example in MySQL mode:
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_TASK_HISTORY\GHere is an example in Oracle mode:
obclient [SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_TASK_HISTORY\G
View the backup sets.
MySQL modeOracle modeHere is an example in MySQL mode:
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_BACKUP_SET_FILES WHERE BACKUP_SET_ID = 1 \GHere is an example in Oracle mode:
obclient [SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_SET_FILES WHERE BACKUP_SET_ID = 1 \G