Skip to content

In etcd version 3.4.13, how to restore the cluster from learner #17794

Answered by ahrtr
cuiHL asked this question in Q&A
Discussion options

You must be logged in to vote

raft will raise panic "panic: removed all voters" when there isn't any voters, so it's expected behaviour.

Usually you should restore a cluster using one of the voting members' data. But if somehow all voting members' data are lost, and you only have a learner's data, then you have two choice,

  1. Using command etcdutl snapshot restore ... to restore the cluster, refer to https://etcd.io/docs/v3.5/op-guide/recovery/#restoring-a-cluster

  2. If you want to use flag --force-new-cluster to bootstrap a new one-member cluster, then you have to do some extra work programatically: you need to promote the learner offline.

    a). Figure out the learner ID

$ bbolt keys ./infra4.etcd/member/snap/db member…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tjungblu
Comment options

Answer selected by jmhbnz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants