From e5ff9800544c40b41858a2f1909fd8a566ad647e Mon Sep 17 00:00:00 2001 From: ptrovatelli <34663482+ptrovatelli@users.noreply.github.com> Date: Sun, 5 Nov 2023 15:32:15 +0100 Subject: [PATCH] Update configure-upgrade-etcd.md Precision on --data-dir option when restoring etcd cluster --- .../tasks/administer-cluster/configure-upgrade-etcd.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md index ac69021c0b..1f9b7fc998 100644 --- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md +++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md @@ -344,13 +344,7 @@ Before starting the restore operation, a snapshot file must be present. It can either be a snapshot file from a previous backup operation, or from a remaining [data directory](https://etcd.io/docs/current/op-guide/configuration/#--data-dir). -Here is an example: - -```shell -ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshot.db -``` - -Another example for restoring using `etcdctl` options: +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 snapshot restore snapshot.db @@ -364,6 +358,8 @@ export ETCDCTL_API=3 etcdctl --data-dir snapshot restore snapshot.db ``` +If `` is the same folder as before, delete it and stop etcd process before restoring the cluster. Else change etcd configuration and restart the etcd process after restoration to make it use the new data directory. + For more information and examples on restoring a cluster from a snapshot file, see [etcd disaster recovery documentation](https://etcd.io/docs/current/op-guide/recovery/#restoring-a-cluster).