Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cmd/skpr/mysql/restore/create/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,24 @@ var (

cmdExample = `
# Create a Mysql restore for dev with BACKUP_ID and wait.
skpr mysql restore create dev BACKUP_ID --wait`
skpr mysql restore create dev BACKUP_ID default --wait`
)

// NewCommand creates a new cobra.Command for 'create' sub command
func NewCommand() *cobra.Command {
command := v1create.Command{}

cmd := &cobra.Command{
Use: "create <environment> <backup_id>",
Args: cobra.ExactArgs(2),
Use: "create <environment> <backup_id> <name>",
Args: cobra.ExactArgs(3),
DisableFlagsInUseLine: true,
Short: "Create a MySQL restore",
Long: cmdLong,
Example: cmdExample,
RunE: func(cmd *cobra.Command, args []string) error {
command.Environment = args[0]
command.Backup = args[1]
command.DatabaseName = args[2]
return command.Run(cmd.Context())
},
}
Expand Down
Loading