After you run a backup job, you can query the settings of backup parameters.
Procedure
Log in to the
systenant of the cluster as therootuser.Query the settings of backup parameters.
Query 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: 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 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.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.Query the backup paths of tenants.
You can query the
oceanbase.CDB_OB_BACKUP_PARAMETERview from thesystenant for the backup paths of all tenants in the current cluster. You can query theoceanbase.DBA_OB_BACKUP_PARAMETERview from a user tenant in MySQL mode or theSYS.DBA_OB_BACKUP_PARAMETERview from a user tenant in Oracle mode for 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 (specified by
data_backup_dest) of the tenant with theTENANT_IDvalue1004isoss://oceanbase-test-bucket/backup/?host=xxx.aliyun-inc.com&access_id=xxx&access_key=xxx, and the backup file cleanup mode (specified bydelete_mode) of the tenant isdelete. You can setdelete_modeto 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.