Uso of 'endpoints' in Backups of ETCDCTL

Hi i have a question when i make a Backup of ETCDL (save), in which cases you should use the parameter: –endpoints obligatorily ?

I understand that if they already give me the location where to save the Backup like in: /tmp/etcd-backup.db, it would be enough:

$ export EDTCD_API=3
$ ETCDCTL=3 etcdctl snapshot save /tmp/etcd-backup.db --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key

But if they also give me the parameter: –endpoints=https://127.0.0.1:2379

$ ETCDCTL=3 etcdctl snapshot save /tmp/etcd-backup.db --endpoints=https://127.0.0.1:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key

What would be the difference between the first and the second form?

Thank you.

Hello @maktup,

The two methods will work properly but for example, If you want to take a snapshot with multiple endpoints for automated backup scripts, you will need to add multiple endpoints in the --endpoints flag. This https://127.0.0.1:2379 is the default endpoint so if the IP changed will need to add It in the --endpoints too.