Add examples to backup create command

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
pull/1355/head
Nolan Brubaker 2019-04-05 14:40:05 -04:00
parent 985479094f
commit bca21a1ec0
1 changed files with 14 additions and 0 deletions

View File

@ -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())