diff --git a/etcdutl/etcdutl/snapshot_command.go b/etcdutl/etcdutl/snapshot_command.go index 8fa89fba0..98958b8e0 100644 --- a/etcdutl/etcdutl/snapshot_command.go +++ b/etcdutl/etcdutl/snapshot_command.go @@ -35,7 +35,7 @@ var ( restoreCluster string restoreClusterToken string restoreDataDir string - restoreWalDir string + restoreWALDir string restorePeerURLs string restoreName string skipHashCheck bool @@ -73,7 +73,7 @@ func NewSnapshotRestoreCommand() *cobra.Command { Run: snapshotRestoreCommandFunc, } cmd.Flags().StringVar(&restoreDataDir, "data-dir", "", "Path to the output data directory") - cmd.Flags().StringVar(&restoreWalDir, "wal-dir", "", "Path to the WAL directory (use --data-dir if none given)") + cmd.Flags().StringVar(&restoreWALDir, "wal-dir", "", "Path to the WAL directory (use --data-dir if none given)") cmd.Flags().StringVar(&restoreCluster, "initial-cluster", initialClusterFromName(defaultName), "Initial cluster configuration for restore bootstrap") cmd.Flags().StringVar(&restoreClusterToken, "initial-cluster-token", "etcd-cluster", "Initial cluster token for the etcd cluster during restore bootstrap") cmd.Flags().StringVar(&restorePeerURLs, "initial-advertise-peer-urls", defaultInitialAdvertisePeerURLs, "List of this member's peer URLs to advertise to the rest of the cluster") @@ -106,14 +106,14 @@ func SnapshotStatusCommandFunc(cmd *cobra.Command, args []string) { } func snapshotRestoreCommandFunc(_ *cobra.Command, args []string) { - SnapshotRestoreCommandFunc(restoreCluster, restoreClusterToken, restoreDataDir, restoreWalDir, + SnapshotRestoreCommandFunc(restoreCluster, restoreClusterToken, restoreDataDir, restoreWALDir, restorePeerURLs, restoreName, skipHashCheck, initialMmapSize, revisionBump, markCompacted, args) } func SnapshotRestoreCommandFunc(restoreCluster string, restoreClusterToken string, restoreDataDir string, - restoreWalDir string, + restoreWALDir string, restorePeerURLs string, restoreName string, skipHashCheck bool, @@ -136,7 +136,7 @@ func SnapshotRestoreCommandFunc(restoreCluster string, dataDir = restoreName + ".etcd" } - walDir := restoreWalDir + walDir := restoreWALDir if walDir == "" { walDir = datadir.ToWALDir(dataDir) }