Skip to content

Disaster recovery examples are missing options and seem to be wrong #1092

@toscom-cru

Description

@toscom-cru

The etcdutl snapshot restore examples in "Restoring with updated membership" and "End-2-End Example" do not work.

To me there are two problems

  1. Error: required flag(s) "data-dir" not set
    The examples are missing the required flag data-dir

  2. If I add the missing data-dir flag I get an error when I set the initial-advertise-peer-urls to host2

$ etcdutl snapshot restore /tmp/db --name pve1 --initial-cluster pve1=http://10.70.6.1:2380,pve2=http://10.70.6.2:2380,pve3=http://10.70.6.3:2380 --initial-cluster-token pvecluster1 --initial-advertise-peer-urls http://10.70.6.2:2380 --data-dir /var/lib/etcd/pve1  --skip-hash-check=true
2025-12-09T10:07:44+01:00	info	netutil/netutil.go:112	resolved URL Host	{"url": "http://10.70.6.2:2380", "host": "10.70.6.2:2380", "resolved-addr": "10.70.6.2:2380"}
2025-12-09T10:07:44+01:00	info	netutil/netutil.go:112	resolved URL Host	{"url": "http://10.70.6.1:2380", "host": "10.70.6.1:2380", "resolved-addr": "10.70.6.1:2380"}
Error: --initial-cluster has pve1=http://10.70.6.1:2380 but missing from --initial-advertise-peer-urls=http://10.70.6.2:2380 (resolved urls: "http://10.70.6.2:2380" != "http://10.70.6.1:2380")

If I replace the IP of host2 with the IP of host1 in the initial-advertise-peer-urls the restore works, but I am totally unsure if this is a bug in the documentation or a bug in the syntaxparser.

Tested on debian 13 with etcd 3.5.16-4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions