etcdctl snapshot status cannot get hush of bucket

285 Views Asked by At

I am learning k8s and had an exercise to backup etcd data, so I used the command:

ETCDCTL_API=3 etcdctl snapshot save --endpoints localhost:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key mysnap.db

which worked nicely :) but then when I tried to get the snapshot status with:

ETCDCTL_API=3 etcdctl snapshot status mysnap.db

and with:

ETCDCTL_API=3 etcdctl snapshot status --endpoints localhost:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key mysnap.db

in both situations I got the error message:

Error: cannot get hash of bucket �_

I tried to understand why but did not find out a lot, only the section of the source code where the error message jump from (in golang) in this URL: https://fossies.org/linux/etcd/clientv3/snapshot/v3_snapshot.go

etcdctl version: 3.2.26

0

There are 0 best solutions below