Skip to content
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

difference between 'etcdctl2 backup' and 'etcdctl3 snapshot save' #7947

Closed
anpingli opened this issue May 18, 2017 · 2 comments
Closed

difference between 'etcdctl2 backup' and 'etcdctl3 snapshot save' #7947

anpingli opened this issue May 18, 2017 · 2 comments

Comments

@anpingli
Copy link

anpingli commented May 18, 2017

In etcd3.x, there are two backup commands 'etcdctl backup(v2 API )' and 'etcdctl snapshot save(v3 API)'. I had make some testing about backup/ restore . I have some questions.

etcdctl2 can backup v2 API data and It didn't copy snap/db files. But the file snap/db are required during restore. Shall I backup snap/db by manually copy it ? Is there any risk to restore with this manually backed snap/db?

There is an option '--keep-cluster-id' for etcdctl2 backup. but I couldn't restore with cluster-id. Does this option work?

etcdctl2 backup also support v3 API. Could we use it to backup v3 data? Is there any risk?

What is the benefit of etcdctl2 snapshot save/restore? Must we to use etcdctl3 snapshot save/restore with v3 API data?

@anpingli anpingli changed the title What is benefit of etcdctl3 snapshot save? difference between 'etcdctl2 backup' and 'etcdctl3 snapshot save' May 18, 2017
@heyitsanthony
Copy link
Contributor

etcdctl2 can backup v2 API data and It didn't copy snap/db files. But the file snap/db are required during restore. Shall I backup snap/db by manually copy it ? Is there any risk to restore with this manually backed snap/db?

I don't think this is safe if done while etcd is still accepting proposals. etcd may complain about the db index not matching raft indexes from the backup. There's currently no way to safely backup both v2 and v3 data together (see #7002).

There is an option '--keep-cluster-id' for etcdctl2 backup. but I couldn't restore with cluster-id. Does this option work?

Restore usually needs --force-new-cluster. See the v2 admin guide

What is the benefit of etcdctl2 snapshot save/restore?

There is no v2 etcdctl snapshot command; it's v3 only.

Must we to use etcdctl3 snapshot save/restore with v3 API data?

Yes.

@anpingli
Copy link
Author

@heyitsanthony Thanks for you reply.

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

No branches or pull requests

2 participants