From b3c6e5e483278384f630b89c5a6304887dfd4f52 Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Mon, 13 May 2019 12:25:25 -0400 Subject: [PATCH] Add more examples to schedule create (#1473) Partially addresses #1464 Signed-off-by: Nolan Brubaker --- pkg/cmd/cli/schedule/create.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/cli/schedule/create.go b/pkg/cmd/cli/schedule/create.go index d9f228698..012ab36c4 100644 --- a/pkg/cmd/cli/schedule/create.go +++ b/pkg/cmd/cli/schedule/create.go @@ -47,8 +47,19 @@ func NewCreateCommand(f client.Factory, use string) *cobra.Command { | 4 | Month | 1-12,* | | 5 | Day of Week | 0-7,* |`, - Example: `velero create schedule NAME --schedule="0 */6 * * *"`, - Args: cobra.ExactArgs(1), + Example: ` # Create a backup every 6 hours + velero create schedule NAME --schedule="0 */6 * * *" + + # Create a backup every 6 hours with the @every notation + velero create schedule NAME --schedule="@every 6h" + + # Create a daily backup of the web namespace + velero create schedule NAME --schedule="@every 1d" --included-namespaces web + + # Create a weekly backup, each living for 90 days (2160 hours) + velero create schedule NAME --schedules="@every 7d" --ttl 2160h0m0s + `, + Args: cobra.ExactArgs(1), Run: func(c *cobra.Command, args []string) { cmd.CheckError(o.Complete(args, f)) cmd.CheckError(o.Validate(c, args, f))