Skip to content

Commit f5360ce

Browse files
Add tab layout for "etcdutl" and "etcdctl" restore options (#46748)
* Update configure-upgrade-etcd.md * Update configure-upgrade-etcd.md Co-authored-by: Dipesh Rawat <[email protected]> * Update configure-upgrade-etcd.md --------- Co-authored-by: Dipesh Rawat <[email protected]>
1 parent ca283d3 commit f5360ce

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -342,24 +342,36 @@ Before starting the restore operation, a snapshot file must be present. It can
342342
either be a snapshot file from a previous backup operation, or from a remaining
343343
[data directory](https://etcd.io/docs/current/op-guide/configuration/#--data-dir).
344344

345-
When restoring the cluster, use the `--data-dir` option to specify to which folder the cluster should be restored:
345+
{{< tabs name="etcd_restore" >}}
346+
{{% tab name="Use etcdutl" %}}
347+
When restoring the cluster using [`etcdutl`](https://github.com/etcd-io/etcd/blob/main/etcdutl/README.md),
348+
use the `--data-dir` option to specify to which folder the cluster should be restored:
346349

347-
```shell
348-
etcdutl --data-dir <data-dir-location> snapshot restore snapshot.db
349-
```
350-
where `<data-dir-location>` is a directory that will be created during the restore process.
350+
```shell
351+
etcdutl --data-dir <data-dir-location> snapshot restore snapshot.db
352+
```
353+
where `<data-dir-location>` is a directory that will be created during the restore process.
351354

352-
The below example depicts the usage of the `etcdctl` tool for the restore operation:
353-
{{< note >}}
354-
The usage of `etcdctl` for restoring has been deprecated since etcd v3.5.x and may be removed from a future etcd release.
355-
{{< /note >}}
355+
{{% /tab %}}
356+
{{% tab name="Use etcdctl (Deprecated)" %}}
356357

357-
```shell
358-
export ETCDCTL_API=3
359-
etcdctl --data-dir <data-dir-location> snapshot restore snapshot.db
360-
```
358+
{{< note >}}
359+
The usage of `etcdctl` for restoring has been **deprecated** since etcd v3.5.x and is slated for removal from etcd v3.6.
360+
It is recommended to utilize [`etcdutl`](https://github.com/etcd-io/etcd/blob/main/etcdutl/README.md) instead.
361+
{{< /note >}}
362+
363+
The below example depicts the usage of the `etcdctl` tool for the restore operation:
364+
365+
```shell
366+
export ETCDCTL_API=3
367+
etcdctl --data-dir <data-dir-location> snapshot restore snapshot.db
368+
```
369+
370+
If `<data-dir-location>` is the same folder as before, delete it and stop the etcd process before restoring the cluster.
371+
Otherwise, change etcd configuration and restart the etcd process after restoration to have it use the new data directory.
361372

362-
If `<data-dir-location>` is the same folder as before, delete it and stop the etcd process before restoring the cluster. Otherwise, change etcd configuration and restart the etcd process after restoration to have it use the new data directory.
373+
{{% /tab %}}
374+
{{< /tabs >}}
363375

364376
For more information and examples on restoring a cluster from a snapshot file, see
365377
[etcd disaster recovery documentation](https://etcd.io/docs/current/op-guide/recovery/#restoring-a-cluster).

0 commit comments

Comments
 (0)