shunfei/cronsun

如何迁移cronsun?

topicgit opened this issue · 2 comments

我们现在使用的一套cronsun在A云,而我们现在需要所有的业务都迁移至另外一个云上,请问这个cronsun迁移应该怎么迁移比较科学?感谢。🙏
@QLeelulu

Please answer these questions before submitting your issue. Thanks!
在你提交 issue 前,请先回答以下问题,谢谢!

  1. What version of Go and cronsun version are you using?
    你用的是哪个版本的 Go 和 哪个版本的 cronsun?
    cronsun-v0.3.5

  2. What operating system and processor architecture are you using (go env)?
    你用的是哪个操作系统,什么架构的?

Centos 7 ,分布式

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    你做了什么,遇到了什么问题?尽可能描述清楚问题,最好把操作步骤写下来,按这些步骤操作后能重现你的问题。

我们现在使用的一套cronsun在A云,而我们现在需要所有的业务都迁移至另外一个云上,请问这个cronsun迁移应该怎么迁移比较科学?感谢。🙏

  1. What did you expect to see?
    你期望得到什么样的结果?

  2. What did you see instead?
    现在你得到的结果是什么样的?

请问您是如何解决迁移问题的?

我在我的环境使用cronsun自带工具csctl进行迁移,迁移失败了

[root@test-oraymsgd cronsun]# ./csctl restore --conf=/usr/local/cronsun/conf/base.json --file=./cronsun_data_(2).zip
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/shunfei/cronsun/bin/csctl/cmd.restoreKvs(0x7f34d6d5d108, 0xc0001961e0, 0xc000033670, 0xd, 0xc0001fc300, 0xc0001d8390, 0x592a43, 0xc0000a0500)
/Users/qleelulu/dev/source/golang/src/github.com/shunfei/cronsun/bin/csctl/cmd/restore.go:88 +0x5f5
github.com/shunfei/cronsun/bin/csctl/cmd.glob..func3(0x10de4c0, 0xc00000ad20, 0x0, 0x2)
/Users/qleelulu/dev/source/golang/src/github.com/shunfei/cronsun/bin/csctl/cmd/restore.go:54 +0x203
github.com/spf13/cobra.(*Command).execute(0x10de4c0, 0xc00000ace0, 0x2, 0x2, 0x10de4c0, 0xc00000ace0)
/Users/qleelulu/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0x10de980, 0x4, 0xb6be2c, 0x1)
/Users/qleelulu/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0x10de980, 0x0, 0x10de000)
/Users/qleelulu/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800 +0x2b
main.main()
/Users/qleelulu/dev/source/golang/src/github.com/shunfei/cronsun/bin/csctl/cmd.go:33 +0x2d