Snapshots: Save & Restore
Warning
This page is only for ETCD version 3.x
and higher!
For the original commands and more information on ETCD, see https://coreos.com/etcd/docs/latest/op-guide/recovery.html.
Take a snapshot¶
1 2 3 |
|
(where snapshot.db
is the name of the snapshot file to be created)
Restore a snapshot¶
Danger
Before restoring a snapshot, all ETCDs in the cluster must be stopped!
You must rename/remove the current data dir (probably /var/lib/etcd
).
Be sure to provide all flags that are specified in, e.g., systemd unit file, Kubespray: /etc/etcd.env
and others otherwise you may create issues for the ETCD cluster!
The command is looking about like that depending on what flags are used for your ETCD node:
1 2 3 4 5 6 7 8 9 10 |
|
This has to be done on all ETCD servers one by one with each having their own name given by flag as they were when the snapshot was taken.