mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
backup: Add fatal if dest snapshot failed
Errors are currently silently swallowed
This commit is contained in:
parent
e3cb3d640b
commit
9974bf0291
@ -58,7 +58,9 @@ func handleBackup(c *cli.Context) {
|
||||
if snapshot != nil {
|
||||
index = snapshot.Index
|
||||
newss := snap.New(destSnap)
|
||||
newss.SaveSnap(*snapshot)
|
||||
if err := newss.SaveSnap(*snapshot); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
w, err := wal.OpenAtIndex(srcWAL, index)
|
||||
|
Loading…
x
Reference in New Issue
Block a user