Skip to content

Commit 3abe6f6

Browse files
Md. Emruz Hossaintamalsaha
authored andcommitted
Use restic 0.9.5 (#789)
* Use restic 0.9.5 * Fixed backup failure handing
1 parent 85b21bf commit 3abe6f6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

run_backup.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package cmds
33
import (
44
"time"
55

6-
"github.com/appscode/go/log"
76
"github.com/golang/glog"
87
"github.com/spf13/cobra"
98
"k8s.io/client-go/kubernetes"
@@ -52,9 +51,8 @@ func NewCmdRunBackup() *cobra.Command {
5251
con.Recorder = eventer.NewEventRecorder(con.K8sClient, backup.BackupEventComponent)
5352
con.Metrics.JobName = con.BackupConfigurationName
5453
if err = con.RunBackup(); err != nil {
55-
log.Errorln("failed to complete backup. Reason: ", err)
56-
//set BackupSession status "Failed", write event and prometheus metrics
57-
return con.HandleBackupFailure(err)
54+
// send setup failure metrics and fail the container so it restart to re-try
55+
con.HandleBackupSetupFailure(err)
5856
}
5957
return nil
6058
},

0 commit comments

Comments
 (0)