diff --git a/internal/cli/cmd/backup/create.go b/internal/cli/cmd/backup/create.go index 13aaecc7..5fa76f3a 100644 --- a/internal/cli/cmd/backup/create.go +++ b/internal/cli/cmd/backup/create.go @@ -20,6 +20,14 @@ import ( "github.com/oceanbase/ob-operator/internal/cli/utils" ) +var createExample = ` + # Create a backup policy by OSS + obocli backup create --archive-path=oss:/// --bak-data-path=oss:/// --oss-access-id= --oss-access-key= + + # Create a backup policy by NFS + obocli backup create --archive-path=nfs:/// --bak-data-path=nfs:/// --bak-encryption-password= +` + // NewCreateCmd create an new backup policy func NewCreateCmd() *cobra.Command { o := backup.NewCreateOptions() @@ -28,6 +36,7 @@ func NewCreateCmd() *cobra.Command { Use: "create ", Short: "Create a backup policy for the specified ob tenant", Long: `Create a backup policy for the specified ob tenant.`, + Example: createExample, Args: cobra.ExactArgs(1), PreRunE: o.Parse, Run: func(cmd *cobra.Command, args []string) {