Browse Source

filer.backup: ignore missing volume/lookup errors when -ignore404Error is set (#7889)

* filer.backup: ignore missing volume/lookup errors when -ignore404Error is set (#7888)

* simplify
pull/7879/merge
Chris Lu 3 days ago
committed by GitHub
parent
commit
935f41bff6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      weed/command/filer_backup.go

7
weed/command/filer_backup.go

@ -146,10 +146,17 @@ func doFilerBackup(grpcDialOption grpc.DialOption, backupOption *FilerBackupOpti
if err == nil {
return nil
}
// ignore HTTP 404 from remote reads
if errors.Is(err, http.ErrNotFound) {
glog.V(0).Infof("got 404 error, ignore it: %s", err.Error())
return nil
}
// also ignore missing volume/lookup errors coming from LookupFileId or vid map
errStr := err.Error()
if strings.Contains(errStr, "LookupFileId") || (strings.Contains(errStr, "volume id") && strings.Contains(errStr, "not found")) {
glog.V(0).Infof("got missing-volume error, ignore it: %s", errStr)
return nil
}
return err
}
} else {

Loading…
Cancel
Save