Skip to content

Commit

Permalink
Remove backup after restore (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
kke committed May 3, 2022
1 parent 03aa425 commit a26c631
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phase/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func (p *Restore) Run() error {
return err
}

defer func() { _ = h.Configurer.DeleteFile(h, dstFile) }()

// Run restore
log.Infof("%s: restoring cluster state", h)
if err := h.Exec(h.K0sRestoreCommand(dstFile), exec.Sudo(h)); err != nil {
Expand Down

0 comments on commit a26c631

Please sign in to comment.