Skip to content

Commit

Permalink
Merge pull request #9255 from gyuho/snapshot-doc
Browse files Browse the repository at this point in the history
snapshot: clarify "Restore" method with conflicting data directory
  • Loading branch information
gyuho authored Jan 31, 2018
2 parents 610aefb + c59d0f9 commit dafbc04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions snapshot/v3_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ type Manager interface {
Status(dbPath string) (Status, error)

// Restore restores a new etcd data directory from given snapshot file.
// It returns an error if specified data directory already exists, to
// prevent unintended data directory overwrites.
Restore(dbPath string, cfg RestoreConfig) error
}

Expand All @@ -73,6 +75,9 @@ type RestoreConfig struct {
// Name is the human-readable name of this member.
Name string
// OutputDataDir is the target data directory to save restored data.
// OutputDataDir should not conflict with existing etcd data directory.
// If OutputDataDir already exists, it will return an error to prevent
// unintended data directory overwrites.
// Defaults to "[Name].etcd" if not given.
OutputDataDir string
// OutputWALDir is the target WAL data directory.
Expand Down

0 comments on commit dafbc04

Please sign in to comment.