From 3ea98991401acca6a1649ec6fea76370bb7f1233 Mon Sep 17 00:00:00 2001 From: Justin Nauman Date: Mon, 14 Aug 2017 21:51:31 -0500 Subject: [PATCH] Adding in defaults for backup creation and restore Signed-off-by: Justin Nauman --- docs/cli-reference/ark_backup_create.md | 2 +- docs/cli-reference/ark_restore_create.md | 2 +- docs/cli-reference/ark_schedule_create.md | 2 +- pkg/cmd/cli/backup/create.go | 1 + pkg/cmd/cli/restore/create.go | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/cli-reference/ark_backup_create.md b/docs/cli-reference/ark_backup_create.md index 1f03a8ce5..706888358 100644 --- a/docs/cli-reference/ark_backup_create.md +++ b/docs/cli-reference/ark_backup_create.md @@ -23,7 +23,7 @@ ark backup create NAME -o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. -l, --selector labelSelector only back up resources matching this label selector (default ) --show-labels show labels in the last column - --snapshot-volumes take snapshots of PersistentVolumes as part of the backup + --snapshot-volumes take snapshots of PersistentVolumes as part of the backup (default true) --ttl duration how long before the backup can be garbage collected (default 24h0m0s) ``` diff --git a/docs/cli-reference/ark_restore_create.md b/docs/cli-reference/ark_restore_create.md index 223222f4e..2943f943e 100644 --- a/docs/cli-reference/ark_restore_create.md +++ b/docs/cli-reference/ark_restore_create.md @@ -19,7 +19,7 @@ ark restore create BACKUP --namespace-mappings mapStringString namespace mappings from name in the backup to desired restored name in the form src1:dst1,src2:dst2,... --namespaces stringArray comma-separated list of namespaces to restore -o, --output string Output display format. For create commands, display the object but do not send it to the server. Valid formats are 'table', 'json', and 'yaml'. - --restore-volumes whether to restore volumes from snapshots + --restore-volumes whether to restore volumes from snapshots (default true) -l, --selector labelSelector only restore resources matching this label selector (default ) --show-labels show labels in the last column ``` diff --git a/docs/cli-reference/ark_schedule_create.md b/docs/cli-reference/ark_schedule_create.md index 8ec9c383a..694610e18 100644 --- a/docs/cli-reference/ark_schedule_create.md +++ b/docs/cli-reference/ark_schedule_create.md @@ -24,7 +24,7 @@ ark schedule create NAME --schedule string a cron expression specifying a recurring schedule for this backup to run -l, --selector labelSelector only back up resources matching this label selector (default ) --show-labels show labels in the last column - --snapshot-volumes take snapshots of PersistentVolumes as part of the backup + --snapshot-volumes take snapshots of PersistentVolumes as part of the backup (default true) --ttl duration how long before the backup can be garbage collected (default 24h0m0s) ``` diff --git a/pkg/cmd/cli/backup/create.go b/pkg/cmd/cli/backup/create.go index 749a93517..1ce21c3ed 100644 --- a/pkg/cmd/cli/backup/create.go +++ b/pkg/cmd/cli/backup/create.go @@ -70,6 +70,7 @@ func NewCreateOptions() *CreateOptions { TTL: 24 * time.Hour, IncludeNamespaces: flag.NewStringArray("*"), Labels: flag.NewMap(), + SnapshotVolumes: true, } } diff --git a/pkg/cmd/cli/restore/create.go b/pkg/cmd/cli/restore/create.go index 1afff1f64..959a66883 100644 --- a/pkg/cmd/cli/restore/create.go +++ b/pkg/cmd/cli/restore/create.go @@ -66,6 +66,7 @@ func NewCreateOptions() *CreateOptions { return &CreateOptions{ Labels: flag.NewMap(), NamespaceMappings: flag.NewMap().WithEntryDelimiter(",").WithKeyValueDelimiter(":"), + RestoreVolumes: true, } }