From b74b506e52160e512ae59db8cd79ec56cd981ed9 Mon Sep 17 00:00:00 2001 From: qinguoyi <1532979219@qq.com> Date: Fri, 2 Aug 2024 15:04:57 +0800 Subject: [PATCH] add command backup destory volume error log (#5846) --- weed/command/backup.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/command/backup.go b/weed/command/backup.go index 3573dbbfd..f9b9fba64 100644 --- a/weed/command/backup.go +++ b/weed/command/backup.go @@ -138,7 +138,9 @@ func runBackup(cmd *Command, args []string) bool { if datSize > stats.TailOffset { // remove the old data - v.Destroy(false) + if err := v.Destroy(false); err != nil { + fmt.Printf("Error destroying volume: %v\n", err) + } // recreate an empty volume v, err = storage.NewVolume(util.ResolvePath(*s.dir), util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0, 0) if err != nil {