データベースの保存方法
etcdデータベースのスナップショットを取得するためのガイド
前提条件
データベースのスナップショットを取得する
etcdデータベースのある時点のスナップショットを保存するsnapshot:
etcdctl --endpoints=$ENDPOINT snapshot save DB_NAME
グローバルオプション
etcdctl
--endpoints=[127.0.0.1:2379], gRPC endpoints
スナップショットを要求できるetcdノードは1つだけなので、--endpointsフラグにはエンドポイントを1つだけ指定する必要があります。
etcdutl
-w, --write-out string set the output format (fields, json, protobuf, simple, table) (default "simple")
例

ENDPOINTS=$HOST_1:2379
etcdctl --endpoints=$ENDPOINTS snapshot save my.db
Snapshot saved at my.db
etcdutl --write-out=table snapshot status my.db
+---------+----------+------------+------------+
| HASH | REVISION | TOTAL KEYS | TOTAL SIZE |
+---------+----------+------------+------------+
| c55e8b8 | 9 | 13 | 25 kB |
+---------+----------+------------+------------+