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
13 changes: 7 additions & 6 deletions cmd/skpr/filesystem/backup/create/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,27 @@ var (
cmdLong = `Create a filesystem backup of an environment.`

cmdExample = `
# Create a filesystem backup of dev.
skpr filesystem backup create dev
# Create a filesystem backup of public mount on dev.
skpr filesystem backup create dev public

# Create and wait for a filesystem backup.
skpr filesystem backup create dev --wait`
# Create and wait for a filesystem backup of private mount.
skpr filesystem backup create dev private --wait`
)

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

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