mirror of
https://github.com/rancher/rke.git
synced 2025-04-27 19:25:44 +00:00
Warn when snapshot name contains file extension
This commit is contained in:
parent
18f605e71e
commit
7bf18c61fd
@ -341,6 +341,10 @@ func RestoreEtcdSnapshotFromCli(ctx *cli.Context) error {
|
||||
if etcdSnapshotName == "" {
|
||||
return fmt.Errorf("you must specify the snapshot name to restore")
|
||||
}
|
||||
// Warn user if etcdSnapshotName contains extension (should just be snapshotname, not the filename)
|
||||
if strings.HasSuffix(etcdSnapshotName, ".zip") {
|
||||
logrus.Warnf("The snapshot name [%s] ends with the file extension (.zip) which is not needed, the snapshot name should be provided without the extension", etcdSnapshotName)
|
||||
}
|
||||
// setting up the flags
|
||||
// flag to use local state file
|
||||
useLocalState := ctx.Bool("use-local-state")
|
||||
|
Loading…
Reference in New Issue
Block a user