This topic describes how to update the cluster-level backup configuration by using obshell-sdk-go.
The difference between updating the cluster-level backup configuration and setting the cluster-level backup configuration is that the backup_base_uri parameter is not required.
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 incrementally.
Note
We recommend that you first read Get started with obshell-sdk-go to learn how to use obshell-sdk-go.
Considerations
Make sure that obshell is running.
The node corresponding to the client must be in an initialized cluster.
Sample code
package main
import (
"github.com/oceanbase/obshell-sdk-go/services"
)
func main() {
// Create a client instance with the node address '10.10.10.1' and port 2886.
client, err := services.NewClientWithPassword("10.10.10.1", 2886, "****")
if err != nil {
panic(err)
}
request := client.V1().NewClusterBackupConfigPatchRequest()
request.SetLogArchiveConcurrency(99)
_, err = client.V1().ClusterBackupConfigSyncWithRequest(request)
if err != nil {
panic(err)
}
}
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 request API methods by using obshell-sdk-python, see Update cluster-level backup configuration.