During data backup, you can modify the source-side backup path configuration based on your business needs. The configuration items include zone, idc, and region. After you modify the configuration, the new configuration will overwrite the original one.
Limitations
You can only modify the source configuration of the backup path for the user tenant. You cannot modify the source configuration of the backup path for a specified user tenant in the system tenant.
Considerations
When you modify the
zone,idc, orregionconfiguration of the backup path, you must first use theALTER SYSTEM MODIFY ZONE zone_name SET REGION=region_name;orALTER SYSTEM MODIFY ZONE zone_name SET IDC=idc_name;statement to set the region or IDC information. We recommend that you set the source configuration at the IDC level. This way, you can use an IDC with more network bandwidth resources to perform backup tasks and have more optional nodes for backup tasks. In this case, you do not need to pay attention to changes in the zones within the IDC in the cluster.When you modify the
zone,idc, orregionconfiguration of the backup path, the leader node of the Root Service must be in the specifiedzone,idc, orregion. Otherwise, the backup task will fail to write backup metadata to the target backup path, resulting in the failure of the backup task. We recommend that you set the source configuration to include the primary zone range.When you modify the
zone,idc, orregionconfiguration of the backup path, if a backup task is in progress, the task may take up to a few minutes to detect the configuration changes. During this time, nodes outside the specified configuration range may still access the backup path, resulting in cross-data center or cross-region traffic.
Procedure
Log in to the user tenant of the cluster as a tenant administrator.
Execute the following statement to modify the source configuration of the backup path.
The SQL statement is as follows:
ALTER SYSTEM {ALTER|CHANGE|MODIFY} EXTERNAL_STORAGE_DEST PATH [=] 'path' SET ATTRIBUTE = '{zone=zone_name | idc=idc_name | region=region_name}';The following table describes the related parameters.
Parameter Description pathThe backup path to be modified. If the archive medium is of the object storage type, the host address of the object storage is also required. For example, when the archive medium is OSS, the path format is as follows: oss://oceanbase-test-bucket/backup/databackup?host=xxxxzone=zone_name | idc=idc_name | region=region_nameThe source of the current backup path. You can choose zone,idc, orregionat the zone, IDC, or region level, respectively. You can choose only one of the levels or choose none.If you want to set multiple zones, multiple IDCs, or multiple regions, separate the zones, IDCs, and regions with commas (,) and semicolons (;). A comma (,) indicates that the nodes in the zones, IDCs, or regions on both sides have the same priority when selecting the node to execute the backup task. A semicolon (;) indicates that the nodes in the zone, IDC, or region on the left have a higher priority than those on the right. That is, the nodes in the zone, IDC, or region on the left are prioritized for executing the backup task. For example, if you set
zone=z1,z2;z3, the backup source is specified asz1,z2, andz3. The priority ofz1andz2is the same, and the priority ofz1andz2is higher than that ofz3.| If the specified
zone,idc, orregiondoes not exist, an error is returned indicating that the source information does not exist (error code-9133). |Here are some examples:
Change the source configuration of the backup path
oss://oceanbase-test-bucket/backup/data?host=****.aliyun-inc.comfromzone=z1,z2;z3toidc=idc1;idc2.obclient(root@mysql001)[(none)]> ALTER SYSTEM CHANGE EXTERNAL_STORAGE_DEST PATH='oss://oceanbase-test-bucket/backup/data?host=****.aliyun-inc.com' SET ATTRIBUTE = 'idc=idc1;idc2';Change the source configuration of the backup path
file:///data/nfs/backup/datafromzone=z1,z2;z3toregion=region1.obclient(root@mysql001)[(none)]> ALTER SYSTEM CHANGE EXTERNAL_STORAGE_DEST PATH='file:///data/nfs/backup/data' SET ATTRIBUTE = 'region=region1';
For more examples, see ALTER/CHANGE/MODIFY EXTERNAL_STORAGE_DEST.
After the modification is successful, you can query the
DBA_OB_BACKUP_STORAGE_INFOview to confirm the modification.For more information about how to view the source configuration of the backup path, see View data backup parameters.