mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 22:26:04 +02:00
etcdctl: add page (#5006)
This commit is contained in:
parent
2718393db1
commit
244a7b1c70
1 changed files with 37 additions and 0 deletions
37
pages/common/etcdctl.md
Normal file
37
pages/common/etcdctl.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# etcdctl
|
||||
|
||||
> CLI interface for interacting with `etcd`, a highly-available key-value pair store.
|
||||
> Etcd stores data in hierarchically organized directories, as in a standard filesystem.
|
||||
> More information: <https://etcd.io/docs/latest/dev-guide/interacting_v3/>.
|
||||
|
||||
- Display the value associated with a specified key:
|
||||
|
||||
`etcdctl get {{my/key}}`
|
||||
|
||||
- Store a key-value pair:
|
||||
|
||||
`etcdctl put {{my/key}} {{my_value}}`
|
||||
|
||||
- Delete a key-value pair:
|
||||
|
||||
`etcdctl del {{my/key}}`
|
||||
|
||||
- Store a key-value pair, reading the value from a file:
|
||||
|
||||
`etcdctl put {{my/file}} < {{path/to/file.txt}}`
|
||||
|
||||
- Save a snapshot of the etcd keystore:
|
||||
|
||||
`etcdctl snapshot save {{path/to/snapshot.db}}`
|
||||
|
||||
- Restore a snapshot of an etcd keystore (restart the etcd server afterwards):
|
||||
|
||||
`etcdctl snapshot restore {{path/to/snapshot.db}}`
|
||||
|
||||
- Add a user:
|
||||
|
||||
`etcdctl user add {{my_user}}`
|
||||
|
||||
- Watch a key for changes:
|
||||
|
||||
`etcdctl watch {{my/key}}`
|
Loading…
Add table
Reference in a new issue