vesoft-inc / nebula-br

Backup and restore utility for Nebula Graph
Apache License 2.0
15 stars 11 forks source link

There is a problem executing the `show` command #15

Closed foesa-yang closed 3 years ago

foesa-yang commented 3 years ago
[foesa.yang@foesa nebula-br]$ ./bin/br show --storage /home/foesa.yang/backup
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x77d85a]

goroutine 1 [running]:
github.com/vesoft-inc/nebula-br/pkg/show.(*Show).ShowInfo(0x0, 0x17, 0xc000092600)
    /home/foesa.yang/nebula-br/pkg/show/show.go:103 +0x3a
github.com/vesoft-inc/nebula-br/cmd.NewShowCmd.func1(0xc0000dbb80, 0xc0000d2a40, 0x0, 0x2, 0x0, 0x0)
    /home/foesa.yang/nebula-br/cmd/show.go:30 +0xde
github.com/spf13/cobra.(*Command).execute(0xc0000dbb80, 0xc0000d2a00, 0x2, 0x2, 0xc0000dbb80, 0xc0000d2a00)
    /home/foesa.yang/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000da840, 0xaedc10, 0x8548dd, 0x3)
    /home/foesa.yang/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
    /home/foesa.yang/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
main.main()
    /home/foesa.yang/nebula-br/main.go:17 +0x1a5

The file has been backed up to the /home/foesa.yang/backup.

The following is the file information in br.log.

{"level":"info","ts":1627553291.7185,"caller":"storage/storage.go:47","msg":"parsed external storage","schema":"","path":"/home/foesa.yang/backup"}
{"level":"error","ts":1627553291.7190783,"caller":"show/show.go:36","msg":"new external storage failed","error":"Unsupported Backend Storage Types","stacktrace":"github.com/vesoft-inc/nebula-br/pkg/show.NewShow\n\t/home/foesa.yang/nebula-br/pkg/show/show.go:36\ngithub.com/vesoft-inc/nebula-br/cmd.NewShowCmd.func1\n\t/home/foesa.yang/nebula-br/cmd/show.go:28\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/foesa.yang/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/foesa.yang/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/foesa.yang/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895\nmain.main\n\t/home/foesa.yang/nebula-br/main.go:17\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:225"}
linkensphere201 commented 3 years ago

you should indicate the backend type @foesa-yang . I think the cmd should be ./bin/br show --storage "local:///home/foesa.yang/backup" in which local:// indicate the backend type is local disk.