aboutsummaryrefslogtreecommitdiff
path: root/weed/command/backup.go
diff options
context:
space:
mode:
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 a8be4838e..f9b9fba64 100644
--- a/weed/command/backup.go
+++ b/weed/command/backup.go
@@ -66,7 +66,7 @@ var cmdBackup = &Command{
func runBackup(cmd *Command, args []string) bool {
- util.LoadConfiguration("security", false)
+ util.LoadSecurityConfiguration()
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client")
if *s.volumeId == -1 {
@@ -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 {