k8s etcd 备份与还原

查看帮助信息

etcdctl --help | grep -E '\-end|-ca|-ce|-key|sn'

查看etcd认证证书路径

ps aux | grep etcd

备份

export ETCDCTL_API=3
etcdctl --endpoints 127.0.0.1:2379 --key=/opt/etcd/ssl/server-key.pem --cert=/opt/etcd/ssl/server.pem --cacert=/opt/etcd/ssl/ca.pem snapshot save /tmp/etcd-db-1

还原

export ETCDCTL_API=3
etcdctl --endpoints 127.0.0..1:2379 --key=/opt/etcd/ssl/server-key.pem --cert=/opt/etcd/ssl/server.pem --key=/top/etcd/ssl/ca.pem snapshot restore /tmp/etcd-db-1

本文链接:

http://blog.ps-ef.cn/Kubernetes/108.html
1 + 9 =
快来做第一个评论的人吧~