Guys, Any idea how to take a ETCD backup and then restore it sitting in a exter . . .

Mayur Sharma:
yeah… may be that is the case. not sure how to take backup and restore in this case

Mayur Sharma:
@Mani can you please elaborate, how did you take backup, restore and transfer backup file in such scenario

Roshan Ranasinghe:
@Mani Did your method work in the exam ? Did they allow to scp?

Hinodeya:
@Mayur Sharma you can install etcd-client on the Vm and running as a deamon in this case the etcd will be managed per this Vitual machine so it means you’ll have a path created and so on

Hinodeya:
@Mani the question meet by mani during the exam is propably to restore etcd to another VM for external etcd scénario

Mani:
Yes, it’s allowed to scp to the master node. You can follow the below steps
For backup - You will be provided with key and certs file of etcd and master_ip, so you can use this command
ETCDCTL_API=3 etcdctl --endpoints=https://<master_ip>:2379
–cacert=<trusted-ca-file> --cert=<cert-file> --key=<key-file>
snapshot save <backup-file-location>
For restore - You might be asked to restore the .db file stored in particular location. So we can try the following steps
1, ETCDCTL_API=3 etcdctl --data-dir /opt/etcd_backup snapshot restore <snapshot_path>
2, scp -r /opt/etcd_backup <user_id>@<master_ip>:/home/<user_id>
3, edit the volume path in etcd.yaml to point to /home/<user_id>/etcd_backup

It will work

Hinodeya:
@Mani on the external VM did you have a daemon client running ?

Hinodeya:
for me you have it because I’don’t understand how the etcd can running correctly :wink:

Mani:
yes, but etcdctl not available in master node

Hinodeya:
yes yes I know that

Hinodeya:
because the client is not installed :wink: