New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best way to dump v3 db to text? #7723

Closed
pgburt opened this Issue Apr 12, 2017 · 6 comments

Comments

4 participants
@pgburt
Copy link

pgburt commented Apr 12, 2017

From Twitter What's the best way of dumping an etcdv3 database to text format?

I suggested tumbling through rows with Clientv3 might be one option. But, that might be naive. Is there an easier way of dumping a v3 db to text output?

Thanks,

@gyuho

This comment has been minimized.

Copy link
Member

gyuho commented Apr 12, 2017

@raesene

This comment has been minimized.

Copy link

raesene commented Apr 12, 2017

Hi, so I'm the original twitterer :) My use case was that I'm looking at Kubernetes security and one of things I was wondering about would be whether it'd be possible to dump information straight from the etcd database of a Kubernetes cluster to help with auditing/reviewing its configuration. It occurred that this could be a good way of doing it as a lot/most of the cluster config is stored in the database.

Through some searching I found https://github.com/br0xen/boltbrowser which kind of works, but gets a lot of non-printable chars in the output. I'll have a look at the etcd-dump-db command as well.

thanks!

@xiang90

This comment has been minimized.

Copy link
Contributor

xiang90 commented Apr 12, 2017

Kubernetes security

k8s use proto format by default in 1.6. so you cannot really dump human readable text from etcd anymore as json format before.

@raesene

This comment has been minimized.

Copy link

raesene commented Apr 12, 2017

ahh, thanks for that, would explain the non-printable characters in straight dumps. So to do this properly I'd need to deserialize the data...

@xiang90

This comment has been minimized.

Copy link
Contributor

xiang90 commented Apr 12, 2017

yes

@xiang90

This comment has been minimized.

Copy link
Contributor

xiang90 commented Apr 13, 2017

closing this. answers are provided.

@xiang90 xiang90 closed this Apr 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment