aboutsummaryrefslogtreecommitdiff
path: root/weed/command/backup.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-07-20 15:35:47 +0800
committerGitHub <noreply@github.com>2020-07-20 15:35:47 +0800
commit5850bb733936399babbe2d77f4b27cac312e2798 (patch)
tree3966daffbb7b2633906f883e3047511772a4fdcf /weed/command/backup.go
parentb1616e93474246a624370ad18da98b8371c09ece (diff)
parentf90d2c93c9e34997a8e76aeefb438ec06b1cd093 (diff)
downloadseaweedfs-5850bb733936399babbe2d77f4b27cac312e2798.tar.xz
seaweedfs-5850bb733936399babbe2d77f4b27cac312e2798.zip
Merge pull request #2 from chrislusf/master
sync
Diffstat (limited to 'weed/command/backup.go')
-rw-r--r--weed/command/backup.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/backup.go b/weed/command/backup.go
index 615be80cf..950cbf68e 100644
--- a/weed/command/backup.go
+++ b/weed/command/backup.go
@@ -112,7 +112,7 @@ func runBackup(cmd *Command, args []string) bool {
return true
}
}
- v, err := storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
+ v, err := storage.NewVolume(util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
if err != nil {
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
return true
@@ -137,7 +137,7 @@ func runBackup(cmd *Command, args []string) bool {
// remove the old data
v.Destroy()
// recreate an empty volume
- v, err = storage.NewVolume(*s.dir, *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
+ v, err = storage.NewVolume(util.ResolvePath(*s.dir), *s.collection, vid, storage.NeedleMapInMemory, replication, ttl, 0, 0)
if err != nil {
fmt.Printf("Error creating or reading from volume %d: %v\n", vid, err)
return true