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
9db4f02289
commit
3601a07879
@ -103,7 +103,7 @@ func SaveWithVersion(ctx context.Context, lg *zap.Logger, cfg clientv3.Config, d
|
||||
return "", fmt.Errorf("could not open %s (%v)", partPath, err)
|
||||
}
|
||||
lg.Info("created temporary db file", zap.String("path", partPath))
|
||||
|
||||
|
||||
defer os.RemoveAll(partPath)
|
||||
defer f.Close()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user