This topic describes how to initiate a backup for a single tenant 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 example shows how to initiate a backup for a single tenant:
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.start_tenant_backup_sync("tenant1", "full")
References
For more information about the API for initiating a backup for a single tenant, see Initiate a backup for a single tenant.
For more information about how to request API methods by using obshell-sdk-go, see Initiate a backup for a single tenant.