etcd 2.3升级到3.0, v2数据转v3
主:
systemctl stop etcd
etcdctl backup --data-dir=/home/data --backup-dir=/home/etcd20181217
恢复: 1、复制数据,启动etcd
cp -r etcd20181217 /var/lib/etcd
etcd --data-dir=/var/lib/etcd --force-new-cluster
2、v2转v3
pkill etcd
export ETCDCTL_API=3
etcdctl migrate --data-dir /var/lib/etcd
systemctl start etcd
etcdctl get / --prefix --keys-only
已经显示数据