Can anyone provide any insight about the following difference regarding `snapsho . . .

Can anyone provide any insight about the following difference regarding snapshot restore

In the link here
The restore command looks like below

ETCDCTL_API=3 etcdctl --endpoints=https://[]:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt \
     --name=master \
     --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key \
     --data-dir /var/lib/etcd-from-backup \
     --initial-cluster=master=<> \
     --initial-cluster-token etcd-cluster-1 \
     --initial-advertise-peer-urls=<> \
     snapshot restore /tmp/snapshot-pre-boot.db

However, in the Video: Section 6: ClusterMaintenance: 132. Solution-Backup and Restore Only the following line is specified

ETCDCTL_API=3 etcdctl snapshot restore &lt;locaton&gt; 
     --data-dir=&lt;new backup etcd directory&gt;

The second command seems to work fine - so my question is… - do I need to specify all the extra parameters as in the first command or is the second command sufficient?

Martin Vengai:
you only need to specify the ca cert, the private key and cert of the etcd server

Thanks Martin, However - Im not sure about that…

I agree with your logic when using &lt;snapshot save&gt; , but with snapshot RESTORE - the backup and restore video doesnt specify any of those keys.

Basavraj Nilkanthe:
@Joe you are right we don’t need to pass certificate details when we are running restore command and as per @Mumshad Mannambeth advise, we need to pass certificate details while taking backup

Basavraj Nilkanthe:
I am sure second command is enough to restore etcd data as long as --data-dir flag stating with different directory than existing one and corresponding changing making in etcd.yaml file in volume hostPath:

Mohamed Ayman:
The initial cluster token, cluster name and initial-advertise-peer-urls are optional, especially when restoring back to the same cluster with a single master.

Thank you everyone - very helpful.