aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/backup.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/command/backup.go b/weed/command/backup.go
index e2b0da7dd..0e14e03ec 100644
--- a/weed/command/backup.go
+++ b/weed/command/backup.go
@@ -103,7 +103,9 @@ func runBackup(cmd *Command, args []string) bool {
v.DataFile().WriteAt(v.SuperBlock.Bytes(), 0)
}
- if uint64(v.Size()) > stats.TailOffset {
+ datSize, _, _ := v.FileStat()
+
+ if datSize > stats.TailOffset {
// remove the old data
v.Destroy()
// recreate an empty volume