Merge pull request #5713 from qiuming-best/restic-empty-dir-fix

[Cherry-Pick]Fix error with Restic backup empty volumes
This commit is contained in:
Xun Jiang/Bruce Jiang
2022-12-20 19:23:12 +08:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -0,0 +1 @@
Fix error with Restic backup empty volumes

View File

@@ -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
}