Modify the status of a cluster-level backup

2026-03-06 07:02:43  Updated

This topic describes how to use obshell-sdk-go to modify the status of a cluster-level backup.

Note

We recommend that you first check out obshell-sdk-go quick start 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().NewClusterBackupStatusPatchRequest()
  request.SetStatus("canceled")
  err = client.V1().ClusterBackupStatusWithPatchRequest(request)
  if err != nil {
    panic(err)
  }
}

References

Contact Us