View data backup parameter settings

2023-12-01 03:27:20  Updated

After you run a backup job, you can query the settings of backup parameters.

Procedure

  1. Log on to the sys tenant of the cluster as the root user.

  2. Execute specific statements to query the settings of backup parameters.

    • View the weight of thread time slices used by job queues with high reliability and a low or medium priority, such as backup job queues and backup cleanup job queues.

      Here is an example:

      obclient [(none)]> SHOW PARAMETERS LIKE '%ha_low_thread_score%'\G
      *************************** 1. row ***************************
            zone: z1
        svr_type: observer
          svr_ip: xx.xx.xx.xx
        svr_port: 45774
            name: ha_low_thread_score
       data_type: NULL
           value: 0
            info: the current work thread score of high availability low thread. Range: [0,100] in integer. Especially, 0 means default value
         section: OBSERVER
           scope: TENANT
          source: DEFAULT
      edit_level: DYNAMIC_EFFECTIVE
      1 row in set
      

      The ha_low_thread_score parameter specifies the time slice weight of threads used by job queues with a low or medium priority, such as backup job queues and backup cleanup job queues. The default value is 0. If a data backup job runs slowly, you can increase the value of the ha_low_thread_score parameter. We recommend that you double the value each time. For more information about the ha_low_thread_score parameter, see ha_low_thread_score.

      To set the concurrency for writing data to the file system during backup, execute the following statement:

      obclient [(none)]>  ALTER SYSTEM SET ha_low_thread_score = 4 TENANT = mysql_tenant;
      

      In this example, the ha_low_thread_score parameter is set to 4 to increase the proportion of thread time slices used by the queue where the backup job of the mysql_tenant tenant belongs.

    • View the backup paths of tenants.

      In the sys tenant, you can query the oceanbase.CDB_OB_BACKUP_PARAMETER view to obtain information about backup paths of all tenants in the current cluster. You can query the oceanbase.DBA_OB_BACKUP_PARAMETER view in a MySQL tenant or the SYS.DBA_OB_BACKUP_PARAMETER view in an Oracle tenant to obtain information about the backup path of the current tenant.

      obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_BACKUP_PARAMETER\G
      

      A sample query result is as follows:

      *************************** 1. row ***************************
      TENANT_ID: 1004
          NAME: data_backup_dest
          VALUE: oss://oceanbase-test-bucket/backup/?host=xxx.aliyun-inc.com&access_id=xxx&access_key=xxx&delete_mode=delete
      1 row in set
      

      In this example, the data backup path (data_backup_dest) of the tenant whose TENANT_ID value is 1004 is oss://oceanbase-test-bucket/backup/?host=xxx.aliyun-inc.com&access_id=xxx&access_key=xxx, and the backup file cleanup mode (delete_mode) of the tenant is delete. delete_mode can be set to either of the following values:

      • delete: specifies that backup files that meet the specified requirements are directly cleaned up.

        After you configure this mode, the system directly deletes the backup files that meet the specified requirements during backup file cleanup.

      • tagging: specifies that backup files that meet the cleanup requirements are tagged and retained.

        After you configure this mode, the system tags backup files that meet the cleanup requirements. The key of the tag is set to delete_mode and the value is set to tagging. This way, you can manage the lifecycle of these files on Alibaba Cloud Object Storage Service (OSS) or Tencent Cloud Object Storage (COS) based on the specified tags.

Contact Us