File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : How to migrate etcd from v2 to v3
3+ description : etcd v2 to v3 migration guide
4+ weight : 1200
5+ ---
6+
7+ ` migrate ` to transform etcd v2 to v3 data format:
8+
9+ ![ 12_etcdctl_migrate_2016061602] ( https://storage.googleapis.com/etcd/demo/12_etcdctl_migrate_2016061602.gif )
10+
11+
12+ ``` shell
13+ # write key in etcd version 2 store
14+ export ETCDCTL_API=2
15+ etcdctl --endpoints=http://$ENDPOINT set foo bar
16+
17+ # read key in etcd v2
18+ etcdctl --endpoints=$ENDPOINTS --output=" json" get foo
19+
20+ # stop etcd node to migrate, one by one
21+
22+ # migrate v2 data
23+ export ETCDCTL_API=3
24+ etcdctl --endpoints=$ENDPOINT migrate --data-dir=" default.etcd" --wal-dir=" default.etcd/member/wal"
25+
26+ # restart etcd node after migrate, one by one
27+
28+ # confirm that the key got migrated
29+ etcdctl --endpoints=$ENDPOINTS get /foo
30+ ```
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: etcd v2 to v3 migration guide
44weight : 1200
55---
66
7- ` migrate ` to transform etcd v2 data model to v3 data model .
7+ ` migrate ` to transform etcd v2 data model to v3 data format .
88
99{{% alert color="warning" %}}
1010⚠️ ** Deprecated functionality:**
You can’t perform that action at this time.
0 commit comments