This topic describes how to configure cluster-level backup settings by using obshell-sdk-python.
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 sample code shows how to synchronize a task:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance, where the node address is '10.10.10.1' and the port is 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
client.v1.post_cluster_backup_config_sync(
backup_base_uri="file:///data/backup",
log_archive_concurrency=100,
ha_low_thread_score=100,
delete_recovery_window="2d",
)
References
For more information about the API for configuring cluster-level backup settings, see Configure cluster-level backup settings.
For more information about how to request API methods by using obshell-sdk-go, see Configure cluster-level backup settings.