From f27e74b9338d2f3e75a77cf3646a1e02b39aecea Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 11 Nov 2025 01:42:41 -0800 Subject: [PATCH] error handling on reading volume ttl and replication --- weed/command/backup.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/weed/command/backup.go b/weed/command/backup.go index 38bb7cbf7..8f52ab534 100644 --- a/weed/command/backup.go +++ b/weed/command/backup.go @@ -116,8 +116,9 @@ func runBackup(cmd *Command, args []string) bool { } else { ttl, err = needle.ReadTTL(stats.Ttl) if err != nil { - fmt.Printf("Error get volume %d ttl %s: %v\n", vid, stats.Ttl, err) - return true + fmt.Printf("Error parsing volume %d ttl %s from %s: %v\n", vid, stats.Ttl, volumeServer, err) + lastErr = err + continue } } var replication *super_block.ReplicaPlacement @@ -130,8 +131,9 @@ func runBackup(cmd *Command, args []string) bool { } else { replication, err = super_block.NewReplicaPlacementFromString(stats.Replication) if err != nil { - fmt.Printf("Error get volume %d replication %s : %v\n", vid, stats.Replication, err) - return true + fmt.Printf("Error parsing volume %d replication %s from %s: %v\n", vid, stats.Replication, volumeServer, err) + lastErr = err + continue } }