Skip to content

Commit

Permalink
Merge pull request #43824 from ptrovatelli/patch-1
Browse files Browse the repository at this point in the history
Update configure-upgrade-etcd.md
  • Loading branch information
k8s-ci-robot authored Jan 26, 2024
2 parents a6c8196 + e5ff980 commit 54145dd
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <data-dir-location> snapshot restore snapshot.db
Expand All @@ -364,6 +358,8 @@ export ETCDCTL_API=3
etcdctl --data-dir <data-dir-location> snapshot restore snapshot.db
```

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.

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).

Expand Down

0 comments on commit 54145dd

Please sign in to comment.