You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/v3.4/how-to-migrate.md
+23-19Lines changed: 23 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,44 +1,44 @@
1
1
---
2
-
title: How to migrate etcd from v2 store to v3
2
+
title: How to migrate etcd from v2store to v3store
3
3
description: etcd v2 to v3 migration guide
4
4
weight: 1200
5
5
---
6
6
7
-
`migrate` to transform etcd v2 to v3 data.
7
+
`migrate` to transform etcd v2store to v3store.
8
8
9
9
{{% alert color="warning" %}}
10
10
⚠️ **Deprecated functionality:**
11
11
12
-
The `etcdctl migrate` command was removed in etcd v3.5.0 ([pull/12971](https://github.com/etcd-io/etcd/pull/12971)). If your etcd cluster is already running v3.5 or higher, you can no longer migrate v2 data to v3 using this method.
12
+
The `etcdctl migrate` command was removed in etcd v3.5.0 ([pull/12971](https://github.com/etcd-io/etcd/pull/12971)). If your etcd cluster is already running v3.5 or higher, you can no longer migrate v2store to v3store using this method.
13
13
14
14
You **must use etcdctl v3.4 or earlier** to perform the migration (View note from [CHANGELOG-3.5](https://github.com/ahrtr/etcd/blob/main/CHANGELOG/CHANGELOG-3.5.md#etcdctl-v3-3)). However please take appropriate precautions when using it, as it is no longer officially supported or tested in recent releases.
15
15
{{% /alert %}}
16
16
17
17
## Pre-requisites
18
18
19
-
Before migrating from etcd v2 to v3, ensure the following:
19
+
Before migrating from etcd v2store to v3store, make sure you have:
20
20
21
-
-A currently running etcd v2 cluster.
22
-
- The `etcdctl` CLI tool version <= v3.4.
21
+
-An etcd cluster that still contains v2store data.
22
+
- The `etcdctl` CLI version 3.4 or earlier.
23
23
- Access to each etcd node and their data directories.
24
24
- A working backup of your etcd data before performing the migration.
25
25
26
26
## Migrate a cluster
27
27
28
-
The following steps show how to migrate your etcd data from v2 to v3 using `etcdctl migrate`.
28
+
The following steps show how to migrate your etcd data stored from v2store to v3store using `etcdctl migrate`.
29
29
30
30
### Variables and Flags Used
31
31
32
32
-`--endpoints`: Specifies the etcd cluster endpoint(s).
33
33
-`--output`: Output format (e.g., `"json"`).
34
34
-`--data-dir`: Path to the data directory (default: `default.etcd`). View more at [etcd flags](https://etcd.io/docs/v3.6/op-guide/configuration/#member).
35
-
-`--wal-dir`: The write-ahead log directory inside `data-dir` (default: `default.etcd/member/wal`). View more at [etcd flags](https://etcd.io/docs/v3.6/op-guide/configuration/#member).
36
-
-`set`: Command to set a key-value pair in etcd v2 (View [READMEv2](https://github.com/etcd-io/etcd/blob/main/etcdctl/READMEv2.md#setting-key-values) for more details. In etcd v3, the equivalent command is `put` instead of `set`, see the [READMEv3](https://github.com/etcd-io/etcd/tree/main/etcdctl#key-value-commands)) for reference.
35
+
-`--wal-dir`: The write-ahead log (WAL) directory inside `data-dir` (default: `default.etcd/member/wal`). View more at [etcd flags](https://etcd.io/docs/v3.6/op-guide/configuration/#member).
36
+
-`set`: Command to set a key-value pair in etcd v2store (View [READMEv2](https://github.com/etcd-io/etcd/blob/main/etcdctl/READMEv2.md#setting-key-values) for more details. In etcd v3, the equivalent command is `put` instead of `set`, see the [READMEv3](https://github.com/etcd-io/etcd/tree/main/etcdctl#key-value-commands)) for reference.
37
37
-`get`: Command to retrieve a key-value pair (View [Read keys](https://etcd.io/docs/v3.6/dev-guide/interacting_v3/#read-keys)).
38
38
39
39
### Migration Process
40
40
41
-
- Step 1: Set up test key using v2 API
41
+
- Step 1: Write a test key into the v2store and confirm that key exists
42
42
43
43
```sh
44
44
export ETCDCTL_API=2
@@ -50,9 +50,9 @@ etcdctl --endpoints=http://$ENDPOINT --output="json" get foo
50
50
51
51
Before running the migration, stop your etcd node to ensure data consistency.
52
52
53
-
- Step 3: Run the migration tool
53
+
- Step 3: Run the migration tool to convert v2store to v3store
54
54
55
-
Switch to API v3 and use `etcdctl migrate` command to transform the v2 store. Please review the deprecation alert on top of the page, you must use etcdctl v3.4 or earlier to be able to perform this command.
55
+
Switch to v3 API and use `etcdctl migrate` command to transform the v2store data into v3store. Please review the deprecation alert on top of the page, you must use etcdctl v3.4 or earlier to be able to perform this command.
0 commit comments