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

etcdctlv3: snapshot/recover design #4896

Closed
xiang90 opened this issue Mar 29, 2016 · 11 comments
Closed

etcdctlv3: snapshot/recover design #4896

xiang90 opened this issue Mar 29, 2016 · 11 comments

Comments

@xiang90
Copy link
Contributor

xiang90 commented Mar 29, 2016

Snapshot

Snapshot command should get a point-in-time consistent snapshot of the v3 KV space

Snapshot command should not snapshot any configuration related data like clusterID or memberID.

TODO: handle lease?

TODO: support incremental snapshot?

Recover

Recover command should write configuration data provided by user like (--initial-cluster, --initial-token, etc..) and create correct member dir.

Recover command should take a snapshot and put it into the right location in the created member dir.

@xiang90
Copy link
Contributor Author

xiang90 commented Mar 29, 2016

/cc @heyitsanthony

@xiang90 xiang90 modified the milestones: v3.0.0, v3.0.0-alpha0 Mar 29, 2016
@colhom
Copy link
Contributor

colhom commented Mar 29, 2016

@xiang90 it looks to me like recover command is roughly what we called set-config command here, plus some additional logic to set up the data directory?

Will recover do integrity verification of the snapshot and return a zero exit code only if it's good? Is that even necessary?

@xiang90
Copy link
Contributor Author

xiang90 commented Mar 29, 2016

it looks to me like recover command is roughly what we called set-config command here, plus some additional logic to set up the data directory?

Right.

Will recover do integrity verification of the snapshot and return a zero exit code only if it's good? Is that even necessary?

Probably we can add a --verify flag? So etcdctl can help to verify the snapshot. Or the verification will delay to server startup time. On the other side, we do expect user to verify snapshot after they store it somewhere. So a force verification seems to be redundant for some use case.

@colhom
Copy link
Contributor

colhom commented Mar 29, 2016

@xiang90 how much validation is done on etcdctl backup? Assuming that whatever backup creates with exit code 0 is "gauranteed" to be valid for restore on any etcd 3.x, the --verify flag would be redundant. Verifying the snapshot hasn't been corrupted between backup and restore is out of scope, for sure.

@xiang90
Copy link
Contributor Author

xiang90 commented Mar 29, 2016

@colhom etcdctl backup guarantees to return a good snapshot when exit with 0.

@colhom
Copy link
Contributor

colhom commented Mar 29, 2016

Ok then, imho we don't need a --verify flag for restore.

@xiang90
Copy link
Contributor Author

xiang90 commented Mar 29, 2016

@colhom I feel so. Thanks!

@heyitsanthony
Copy link
Contributor

I think auth and alarms would need special handling too.

Maybe it'd make sense to have a special etcd KV space and use the KV machinery already in place (watchers, get) instead of managing custom buckets?

@xiang90
Copy link
Contributor Author

xiang90 commented Mar 29, 2016

@heyitsanthony In most of the cases (if not all), users just want to backup the static data not dynamic ones like leases, watcher or alarm I think.

@xiang90
Copy link
Contributor Author

xiang90 commented Apr 11, 2016

@heyitsanthony Shall we close this one?

@heyitsanthony
Copy link
Contributor

@xiang90 yeah seems like it's all hammered out

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

3 participants