This topic describes how to update the backup configuration of a tenant by using obshell-sdk-python.
The difference between updating the backup configuration of a tenant and setting the backup configuration of a tenant is that you do not need to specify the data_base_uri and archive_base_uri parameters.
Notice
If you want to set the binding and piece_switch_interval parameters, you must set the archive_base_uri parameter, because the three parameters are bound and cannot be set individually.
Note
We recommend that you first read Get started with obshell-sdk-python to learn how to use obshell-sdk-python.
Considerations
Make sure that obshell is running.
The node corresponding to the client must be in an initialized cluster.
Sample code
The following example shows how to execute a task synchronously:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance. The node address is '10.10.10.1', and the port is 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
client.v1.patch_tenant_backup_config_sync(
"tenant1",
log_archive_concurrency=100,
ha_low_thread_score=100,
delete_recovery_window="2d",
)
References
For more information about the API for updating the backup configuration of a tenant, see Update the backup configuration of a tenant.
For more information about how to call the API method by using obshell-sdk-go, see Update the backup configuration of a tenant.