aboutsummaryrefslogtreecommitdiff
path: root/weed/command/backup.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-04-18 21:43:36 -0700
committerChris Lu <chris.lu@gmail.com>2019-04-18 21:43:36 -0700
commite5506152c0a27d38fa334b2e338d82ee02669ab9 (patch)
tree1f589cbbf7244cbe5dbfe84ca89f5996e4ca9ff3 /weed/command/backup.go
parent33c92b819a334b5709e6f1cbe304e4b8855c1238 (diff)
downloadseaweedfs-e5506152c0a27d38fa334b2e338d82ee02669ab9.tar.xz
seaweedfs-e5506152c0a27d38fa334b2e338d82ee02669ab9.zip
refactoring
Diffstat (limited to 'weed/command/backup.go')
-rw-r--r--weed/command/backup.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/command/backup.go b/weed/command/backup.go
index 7a98f60d9..e2b0da7dd 100644
--- a/weed/command/backup.go
+++ b/weed/command/backup.go
@@ -2,8 +2,10 @@ package command
import (
"fmt"
+
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/server"
+ "github.com/chrislusf/seaweedfs/weed/storage/needle"
"github.com/spf13/viper"
"github.com/chrislusf/seaweedfs/weed/operation"
@@ -56,7 +58,7 @@ func runBackup(cmd *Command, args []string) bool {
if *s.volumeId == -1 {
return false
}
- vid := storage.VolumeId(*s.volumeId)
+ vid := needle.VolumeId(*s.volumeId)
// find volume location, replication, ttl info
lookup, err := operation.Lookup(*s.master, vid.String())
@@ -71,7 +73,7 @@ func runBackup(cmd *Command, args []string) bool {
fmt.Printf("Error get volume %d status: %v\n", vid, err)
return true
}
- ttl, err := storage.ReadTTL(stats.Ttl)
+ 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