This topic describes how to configure the backup settings for a tenant by using obshell-sdk-python.
Note
We recommend that you first go to obshell-sdk-python quick start 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 perform the task synchronously:
from obshell import ClientSet
from obshell.auth import PasswordAuth
# Create a client instance with the node address '10.10.10.1' and the port 2886.
client = ClientSet("10.10.10.1", 2886, PassswordAuth("****"))
client.v1.post_tenant_backup_config_sync(
"tenant1",
"file:///data/backup/data",
"file:///data/backup/archive"
log_archive_concurrency=100,
ha_low_thread_score=100,
delete_recovery_window="2d",
)
References
For more information about the API for configuring the backup settings for a tenant, see Configure the backup settings for a tenant.
For more information about how to call the API by using obshell-sdk-go, see Configure the backup settings for a tenant.