Question
Restore ETCd database from ~/etcd-backup.db to data directory /var/lib/etc818
Answer
Go to Kubernetes documentation page and grab the command for restore. Adjust it:
sudo ETCDCTL_API=3 etcdctl snapshot restore --data-dir /var/lib/etc818 ~/etcd-backup.db
Verify:
sudo ls /var/lib/etcd*
There is one more step you need to perform. You need to specify the host path in ETCd static pod configuration file. Modify /etc/kubernetes/manifests/etcd.yaml:
volumes:
- hostPath:
path: /var/lib/etc818
type: DirectoryOrCreate
name: etcd-data
Save the changes and wait now. ETCd should be restored.