After you run a backup job, you can query the settings of backup parameters.
Procedure
Log on to the
systenant of the cluster as therootuser.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 setThe
ha_low_thread_scoreparameter 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 is0. If a data backup job runs slowly, you can increase the value of theha_low_thread_scoreparameter. We recommend that you double the value each time. For more information about theha_low_thread_scoreparameter, 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_scoreparameter is set to4to increase the proportion of thread time slices used by the queue where the backup job of themysql_tenanttenant belongs.View the backup paths of tenants.
In the
systenant, you can query theoceanbase.CDB_OB_BACKUP_PARAMETERview to obtain information about backup paths of all tenants in the current cluster. You can query theoceanbase.DBA_OB_BACKUP_PARAMETERview in a MySQL tenant or theSYS.DBA_OB_BACKUP_PARAMETERview in an Oracle tenant to obtain information about the backup path of the current tenant.obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_BACKUP_PARAMETER\GA 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 setIn this example, the data backup path (
data_backup_dest) of the tenant whoseTENANT_IDvalue is1004isoss://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 isdelete.delete_modecan 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_modeand the value is set totagging. 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.