Hi all, i have a question about etcd restore. In k8s docs and CKA course, i lear . . .

김경준:
Hi all, i have a question about etcd restore.
In k8s docs and CKA course, i learned we can perform restore operation just with this below’s simple command.

 $ETCDCTL_API=3 etcdctl snapshot restore <snapshotdb> --data-dir=<NEW-DIRECTORY>

But when i searched about etcd restore method in google, many blogs say we have to give more options to etcd restore like below.

ETCDCTL_API=3 etcdctl snapshot restore <snapshotdb> --name <NODE-NAME> \
 --initial-cluster <NODE-NAME1>=https://<IP1>:2380 \ 
 --initial-advertise-peer-urls https://<NODE-IP>:2380 \
 --data-dir <NEW-DIRECTORY>

My question is, should i have to give more options like second example? or just typing simple command like k8s docs?
I think first example is right because additional options(initial-cluster,) are already configured in existing etcd config file(/etc/kubernetes/manifest/etcd.yaml). Is it right?

Mohamed Ayman:
In this case, we are restoring the snapshot to a different directory but in the same server where we took the backup. As a result, the only required option for the restore command is the --data-dir.

For more information please check the document below

https://github.com/mmumshad/kubernetes-the-hard-way/blob/master/practice-questions-answers/cluster-maintenance/backup-etcd/etcd-backup-and-restore.md|https://github.com/mmumshad/kubernetes-the-hard-way/blob/master/practice-questions-answers/cluster-maintenance/backup-etcd/etcd-backup-and-restore.md