From 935f41bff661af3480c3cab9100a6d318a0aa7e4 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 26 Dec 2025 15:44:30 -0800 Subject: [PATCH] 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 --- weed/command/filer_backup.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/weed/command/filer_backup.go b/weed/command/filer_backup.go index 996260c1e..3387fccbf 100644 --- a/weed/command/filer_backup.go +++ b/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 {