website icon indicating copy to clipboard operation
website copied to clipboard

Disaster recovery page needs --data-dir?

Open jayunit100 opened this issue 2 years ago • 5 comments

https://etcd.io/docs/v3.5/op-guide/recovery/ is useful but, its missing a key detail: making sure you put etcds snapshot recovery into the right place, so that etcd on restart reads the recovered data...

I believe in general

  • you want to store the snapshot,
  • restore it to a directory
  • put that directory in place of, say /var/lib/etcd/, or wherever your --data-dir normally is...

lets update the recovery page to explicitly include --data-dir as an arg to the etcd restart example, in the overall instructions (and possibly the step of making sure the snapshot is moved into that explicitly)

(let me know if im missing anything here)

jayunit100 avatar Jul 12 '22 20:07 jayunit100

Thanks @jayunit100 , it makes sense to me. Users either specify the flag --data-dir or manually move the recovered data to the target directory.

Please note starting from etcd 3.6, users can only use etcdctl to save the data to a snapshot, but use etcdutl to restore the data from a snapshot.

cc @spzala @serathius

ahrtr avatar Jul 13 '22 00:07 ahrtr

@jayunit100 Feel free to send a PR.

serathius avatar Jul 13 '22 08:07 serathius

@jayunit100 explicitly mentioning it sounds good. As @serathius mentioned please create a PR for better review of changes. Thanks!

spzala avatar Jul 13 '22 13:07 spzala

Related pull request https://github.com/etcd-io/website/pull/603

jmhbnz avatar May 12 '23 19:05 jmhbnz

Thanks @jmhbnz

spzala avatar May 12 '23 21:05 spzala