This topic describes how to update the cluster-level backup configuration by using obshell-sdk-python.
The difference between updating the cluster-level backup configuration and setting the cluster-level backup configuration is that the backup_base_uri parameter can be left unset.
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.
Example code
The following example shows how to perform a task synchronously:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance, whose node address is '10.10.10.1' and port is 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
client.v1.patch_cluster_backup_config_sync(
log_archive_concurrency=100,
ha_low_thread_score=100,
delete_recovery_window="2d",
)
References
For more information about the API for updating the cluster-level backup configuration, see Update cluster-level backup configuration.
For more information about how to call the API method by using obshell-sdk-go, see Update cluster-level backup configuration.