open-vault/command/operator_raft_snapshot.go
Vishal Nayak 5647f978f1
Raft cli docs (#8548)
* Raft cli docs

* s/raft/Raft

* s/raft/Raft

* Update website/pages/docs/commands/operator/raft.mdx

Co-Authored-By: Meggie <m.ladlow@gmail.com>

* Mention that shamir seal requires unseal keys

Co-authored-by: Meggie <m.ladlow@gmail.com>
2020-03-17 09:46:44 -04:00

44 lines
1.1 KiB
Go

package command
import (
"strings"
"github.com/mitchellh/cli"
)
var _ cli.Command = (*OperatorRaftSnapshotCommand)(nil)
type OperatorRaftSnapshotCommand struct {
*BaseCommand
}
func (c *OperatorRaftSnapshotCommand) Synopsis() string {
return "Restores and saves snapshots from the Raft cluster"
}
func (c *OperatorRaftSnapshotCommand) Help() string {
helpText := `
Usage: vault operator raft snapshot <subcommand> [options] [args]
This command groups subcommands for operators interacting with the snapshot
functionality of the integrated Raft storage backend. Here are a few examples of
the Raft snapshot operator commands:
Installs the provided snapshot, returning the cluster to the state defined in it:
$ vault operator raft snapshot restore raft.snap
Saves a snapshot of the current state of the Raft cluster into a file:
$ vault operator raft snapshot save raft.snap
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
}
func (c *OperatorRaftSnapshotCommand) Run(args []string) int {
return cli.RunResultHelp
}