【手摸手玩轉 OceanBase 165】怎麼檢視資料備份進度?

13579NB232發表於2023-01-19

執行資料備份後,您可以檢視備份進度。

透過檢視檢視資料備份進度

系統租戶可以透過  oceanbase.CDB_OB_BACKUP_JOBS 檢視和  oceanbase.CDB_OB_BACKUP_TASKS 檢視檢視資料備份的進度。

  1. 使用  root 使用者登入到資料庫的  sys 租戶。

  2. 檢視資料備份進度。

    示例如下:

    obclient> SELECT * FROM oceanbase.CDB_OB_BACKUP_JOBS\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 17:10:23.975539
          END_TIMESTAMP:
                 STATUS: DOING
                 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 17:10:24.046643
          END_TIMESTAMP:
                 STATUS: DOING
                 RESULT: 0
                COMMENT:
            DESCRIPTION:
                   PATH: file:///data/nfs/backup/data
    obclient> SELECT * FROM oceanbase.CDB_OB_BACKUP_TASKS\G
    *************************** 1. row ***************************
                  TENANT_ID: 1002
                    TASK_ID: 1
                     JOB_ID: 1
                INCARNATION: 1
              BACKUP_SET_ID: 1
            START_TIMESTAMP: 2022-06-01 17:10:24.046643
              END_TIMESTAMP:
                     STATUS: BACKUP_DATA
                  START_SCN: 1658740213006643504
                    END_SCN: 0
          USER_LS_START_SCN: 1658740229412297106
            ENCRYPTION_MODE: NONE
                     PASSWD:
                INPUT_BYTES: 0
               OUTPUT_BYTES: 0
          OUTPUT_RATE_BYTES: 0.0000
           EXTRA_META_BYTES: 0
               TABLET_COUNT: 0
        FINISH_TABLET_COUNT: 0
          MACRO_BLOCK_COUNT: 0
    FINISH_MACRO_BLOCK_COUNT: 0
                 FILE_COUNT: 0
               META_TURN_ID: 1
               DATA_TURN_ID: 1
                     RESULT: 0
                    COMMENT:
                        PATH: file:///data/nfs/backup/data

上面的示例中,租戶 ID 為  1002 的租戶正在進行資料備份,其備份目的端為  file:///data/nfs/backup/data , 當前的資料備份狀態為  DOING

更多  CDB_OB_BACKUP_JOBS 和  CDB_OB_BACKUP_TASKS 檢視的說明,請參見  CDB_OB_BACKUP_JOBS 和  CDB_OB_BACKUP_TASKS

相關閱讀

檢視資料備份結果


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70026124/viewspace-2932881/,如需轉載,請註明出處,否則將追究法律責任。

相關文章