Merge pull request #44050 from adityasamant25/etcd-restore

Use etcdutl instead of etcdctl for restoring an etcd cluster
pull/46567/head
Kubernetes Prow Robot 2024-05-28 10:20:33 -07:00 committed by GitHub
commit 17c52782c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -345,11 +345,14 @@ either be a snapshot file from a previous backup operation, or from a remaining
When restoring the cluster, use the `--data-dir` option to specify to which folder the cluster should be restored:
```shell
ETCDCTL_API=3 etcdctl --data-dir <data-dir-location> snapshot restore snapshot.db
etcdutl --data-dir <data-dir-location> snapshot restore snapshot.db
```
where `<data-dir-location>` is a directory that will be created during the restore process.
Yet another example would be to first export the `ETCDCTL_API` environment variable:
The below example depicts the usage of the `etcdctl` tool for the restore operation:
{{< note >}}
The usage of `etcdctl` for restoring has been deprecated since etcd v3.5.x and may be removed from a future etcd release.
{{< /note >}}
```shell
export ETCDCTL_API=3