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 current number of worker threads for high-availability low-priority jobs such as backup jobs and backup cleanup jobs.
Here is an example:
obclient [(none)]> SHOW PARAMETERS LIKE '%ha_low_thread_score%'\GThe query result is as follows:
*************************** 1. row *************************** zone: zone1 svr_type: observer svr_ip: 172.xx.xxx.xxx svr_port: 2882 name: ha_low_thread_score data_type: INT 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 default_value: 0 isdefault: 1 1 row in setThe
ha_low_thread_scoreparameter specifies the current number of worker threads for high-availability low-priority jobs such as backup and backup cleanup jobs. 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 to4, which indicates that the number of worker threads for backup jobs in themysql_tenanttenant is4.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.In 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.In this mode, the system tags the backup files that meet the specified requirements during backup file cleanup. The tag
keyisdelete_mode, and the tagvalueistagging. You can manage these backup files on Alibaba Cloud Object Storage Service (OSS), Tencent Cloud Object Storage (COS), or Amazon Simple Storage Service (S3) over their lifecycle by tag.