Skip to content

Commit 54145dd

Browse files
authored
Merge pull request #43824 from ptrovatelli/patch-1
Update configure-upgrade-etcd.md
2 parents a6c8196 + e5ff980 commit 54145dd

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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

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

347-
Here is an example:
348-
349-
```shell
350-
ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshot.db
351-
```
352-
353-
Another example for restoring using `etcdctl` options:
347+
When restoring the cluster, use the `--data-dir` option to specify to which folder the cluster should be restored:
354348

355349
```shell
356350
ETCDCTL_API=3 etcdctl --data-dir <data-dir-location> snapshot restore snapshot.db
@@ -364,6 +358,8 @@ export ETCDCTL_API=3
364358
etcdctl --data-dir <data-dir-location> snapshot restore snapshot.db
365359
```
366360

361+
If `<data-dir-location>` 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.
362+
367363
For more information and examples on restoring a cluster from a snapshot file, see
368364
[etcd disaster recovery documentation](https://etcd.io/docs/current/op-guide/recovery/#restoring-a-cluster).
369365

0 commit comments

Comments
 (0)