mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: add etcdctl snapshot pipe command
To improve the security of etcdctl. Added the ability to write snapshots to stdout without writing data to disk. Signed-off-by: Ais8Ooz8 <47941654+Ais8Ooz8@users.noreply.github.com>
This commit is contained in:
parent
8975ef0a95
commit
2ddb9f40a2
@ -28,6 +28,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.6.0).
|
||||
### etcdctl v3
|
||||
|
||||
- Add command to generate [shell completion](https://github.com/etcd-io/etcd/pull/13133).
|
||||
- Add command [snapshot pipe](https://github.com/etcd-io/etcd/pull/16243).
|
||||
- When print endpoint status, [show db size in use](https://github.com/etcd-io/etcd/pull/13639)
|
||||
- [Always print the raft_term in decimal](https://github.com/etcd-io/etcd/pull/13711) when displaying member list in json.
|
||||
- [Add one more field `storageVersion`](https://github.com/etcd-io/etcd/pull/13773) into the response of command `etcdctl endpoint status`.
|
||||
|
||||
@ -44,7 +44,7 @@ func hasChecksum(n int64) bool {
|
||||
// context.DeadlineExceeded). Make sure to specify only one endpoint
|
||||
// in client configuration. Snapshot API must be requested to a
|
||||
// selected node, and saved snapshot is the point-in-time state of
|
||||
// the selected node. Etcd < v3.6 will return "" as version.
|
||||
// the selected node. Nota bene: etcd < v3.6 will return "" as version.
|
||||
func WriteSnapshotWithVersion(ctx context.Context, lg *zap.Logger, cfg clientv3.Config, f *os.File) (string, error) {
|
||||
cfg.Logger = lg.Named("client")
|
||||
if len(cfg.Endpoints) != 1 {
|
||||
|
||||
@ -1024,7 +1024,7 @@ The backend snapshot is written to stdout.
|
||||
|
||||
Write a snapshot to stdout:
|
||||
```
|
||||
./etcdctl snapshot pipe
|
||||
./etcdctl snapshot pipe > snapshot.db
|
||||
```
|
||||
|
||||
### SNAPSHOT SAVE \<filename\>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user