Skip to content

Commit

Permalink
[Cherry-Pick]Fix error with Restic backup empty volumes
Browse files Browse the repository at this point in the history
Signed-off-by: Ming <[email protected]>
  • Loading branch information
qiuming-best committed Dec 20, 2022
1 parent 55873c1 commit 75922ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelogs/unreleased/5711-qiuming-best
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix error with Restic backup empty volumes
2 changes: 1 addition & 1 deletion pkg/uploader/provider/restic.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (rp *resticProvider) RunBackup(

summary, stderrBuf, err := restic.RunBackup(backupCmd, log, updater)
if err != nil {
if strings.Contains(err.Error(), "snapshot is empty") {
if strings.Contains(stderrBuf, "snapshot is empty") {
log.Debugf("Restic backup got empty dir with %s path", path)
return "", true, nil
}
Expand Down

0 comments on commit 75922ac

Please sign in to comment.