diff --git a/pkg/cmd/cli/backup/create.go b/pkg/cmd/cli/backup/create.go index 3bc7d3b15..61bc105b1 100644 --- a/pkg/cmd/cli/backup/create.go +++ b/pkg/cmd/cli/backup/create.go @@ -46,6 +46,20 @@ func NewCreateCommand(f client.Factory, use string) *cobra.Command { cmd.CheckError(o.Validate(c, args, f)) cmd.CheckError(o.Run(c, f)) }, + Example: ` # create a backup containing all resources + velero backup create backup1 + + # create a backup including only the nginx namespace + velero backup create nginx-backup --include-namespaces nginx + + # create a backup excluding the velero and default namespaces + velero backup create backup2 --exclude-namespaces velero,default + + # view the YAML for a backup that doesn't snapshot volumes, without sending it to the server + velero backup create backup3 --snapshot-volumes=false -o yaml + + # wait for a backup to complete before returning from the command + velero backup create backup4 --wait`, } o.BindFlags(c.Flags())