...
Warning |
---|
If you have an etcd cluster, you can select only one node, otherwise you get the error |
Take a snapshot of the etcd datastore using the following command, which generates the <snapshot>
file <snapshot_file>
Code Block | ||||
---|---|---|---|---|
| ||||
$ etcdctl snapshot save <snapshot_file><snapshot> --endpoints=<endpoint>:<port> # Instead of <endpoint> you can substitute a hostname or an IP $ etcdctl snapshot save snapshot.db --endpoints=etcd1:2379 $ etcdctl snapshot save snapshot.db --endpoints=192.168.100.88:2379 # View that the snapshot was successful $ etcdctl snapshot status snapshot.db --write-out=table +----------+----------+------------+------------+ | HASH | REVISION | TOTAL KEYS | TOTAL SIZE | +----------+----------+------------+------------+ | b89543b8 | 40881777 | 54340 | 106 MB | +----------+----------+------------+------------+ |
...