You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running etcdctl snapshot restore doesn't actually restore any data to the cluster.
Data that should have been stored in the snapshot isn't restored to the cluster.
root@etcd01:~# docker run -it --net host -v /etc/kubernetes:/etc/kubernetes k8s.gcr.io/etcd:${ETCD_TAG} etcdctl --cert /etc/kubernetes/pki/etcd/peer.crt --key /etc/kubernetes/pki/etcd/peer.key --cacert /etc/kubernetes/pki/etcd/ca.crt --endpoints https://${HOST0}:2379 snapshot restore /etc/kubernetes/snapshot01
Deprecated: Use `etcdutl snapshot restore` instead.
2022-03-07T23:28:26Z info snapshot/v3_snapshot.go:251 restoring snapshot {"path": "/etc/kubernetes/snapshot01", "wal-dir": "default.etcd/member/wal", "data-dir": "default.etcd", "snap-dir": "default.etcd/member/snap", "stack": "go.etcd.io/etcd/etcdutl/v3/snapshot.(*v3Manager).Restore\n\t/tmp/etcd-release-3.5.1/etcd/release/etcd/etcdutl/snapshot/v3_snapshot.go:257\ngo.etcd.io/etcd/etcdutl/v3/etcdutl.SnapshotRestoreCommandFunc\n\t/tmp/etcd-release-3.5.1/etcd/release/etcd/etcdutl/etcdutl/snapshot_command.go:147\ngo.etcd.io/etcd/etcdctl/v3/ctlv3/command.snapshotRestoreCommandFunc\n\t/tmp/etcd-release-3.5.1/etcd/release/etcd/etcdctl/ctlv3/command/snapshot_command.go:128\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/remote/sbatsche/.gvm/pkgsets/go1.16.3/global/pkg/mod/github.com/spf13/[email protected]/command.go:856\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/remote/sbatsche/.gvm/pkgsets/go1.16.3/global/pkg/mod/github.com/spf13/[email protected]/command.go:960\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/remote/sbatsche/.gvm/pkgsets/go1.16.3/global/pkg/mod/github.com/spf13/[email protected]/command.go:897\ngo.etcd.io/etcd/etcdctl/v3/ctlv3.Start\n\t/tmp/etcd-release-3.5.1/etcd/release/etcd/etcdctl/ctlv3/ctl.go:107\ngo.etcd.io/etcd/etcdctl/v3/ctlv3.MustStart\n\t/tmp/etcd-release-3.5.1/etcd/release/etcd/etcdctl/ctlv3/ctl.go:111\nmain.main\n\t/tmp/etcd-release-3.5.1/etcd/release/etcd/etcdctl/main.go:59\nruntime.main\n\t/home/remote/sbatsche/.gvm/gos/go1.16.3/src/runtime/proc.go:225"}
2022-03-07T23:28:26Z info membership/store.go:141 Trimming membership information from the backend...
2022-03-07T23:28:26Z info membership/cluster.go:421 added member {"cluster-id": "cdf818194e3a8c32", "local-member-id": "0", "added-peer-id": "8e9e05c52164694d", "added-peer-peer-urls": ["http://localhost:2380"]}
2022-03-07T23:28:26Z info snapshot/v3_snapshot.go:272 restored snapshot {"path": "/etc/kubernetes/snapshot01", "wal-dir": "default.etcd/member/wal", "data-dir": "default.etcd", "snap-dir": "default.etcd/member/snap"}
What did you expect to happen?
Etcd restores data from snapshot
How can we reproduce it (as minimally and precisely as possible)?
Set up an etcd cluster
Add a couple of keys to the cluster (ie. put FirstName Trevor, put LastName Sullivan)
Run etcdctl snapshot save
Run etcdctl snapshot restore
I followed these documents to set up a cluster, and tried using etcdctl to backup and restore a cluster.
Even though the restore appears to succeed, the data isn't actually restored to the cluster.
the snapshot restore command does not send requests to etcd. Before using the command, you need to stop the all etcd pod, add the --data-dir flag to your data directory (maybe /var/lib/etcd/default.etcd),and run this command to rebuild the data directory.
What happened?
Running
etcdctl snapshot restore
doesn't actually restore any data to the cluster.Data that should have been stored in the snapshot isn't restored to the cluster.
What did you expect to happen?
Etcd restores data from snapshot
How can we reproduce it (as minimally and precisely as possible)?
put FirstName Trevor
,put LastName Sullivan
)etcdctl snapshot save
etcdctl snapshot restore
I followed these documents to set up a cluster, and tried using
etcdctl
to backup and restore a cluster.Even though the restore appears to succeed, the data isn't actually restored to the cluster.
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/
Anything else we need to know?
etcdctl said restoring snapshots is deprecated, but the
etcdutl
command that it points to doesn't work either.Etcd version (please run commands below)
Etcd configuration (command line flags or environment variables)
Etcd debug information (please run commands blow, feel free to obfuscate the IP address or FQDN in the output)
Relevant log output
No response
The text was updated successfully, but these errors were encountered: