将Redis DB导入Kubernetes上的其他Redis群集
我在Kubernetes中有状态填充群。
我想导入将othet redis带到此redis群集的dump.rdb文件。导入此转储文件的最佳方法是什么?
I have statefulset redis cluster in kubernetes.
I want to import dump.rdb file which is taken othet redis to this redis cluster . what is the best way to import this dump file ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它可能很丑陋,但可以工作
1-用您的转储文件创建一个配置毫米(不知道dump.rdb是否是二进制文件,我认为这不是二进制文件,但是如果这是二进制文件,请遵循以下操作: 我如何将二进制文件存储在kubernetes中configmap?),您可以以命令的方式进行此操作:
2-在您的状态填充中像这样:
3-创建,以相同的方式来安装redis配置文件(如果还没有完成,如果您应该做的话)。
4-在您的配置文件中,更改为以下参数,告诉redis使用dump.rdb文件的新位置。您刚刚安装的RDB文件:
在使用新配置重新启动您的状态填充之后,应该是这样,请告诉我是否有效
It may be ugly but can work
1- Create a configmap with your dump file in it ( don't know if the dump.rdb is a binary file or not, I assume this is not but if this is a binary file follow this: How can I store a binary file in a Kubernetes ConfigMap?), you can do this in an imperative manner for example with:
2- Mount it like this in your statefulset:
3- Create, in the same way a configmap to mount the redis configuration file ( if not already done, if not you should).
4- In you configuration file, change to following parameters to tell redis to use the new location of the dump.rdb file you just mounted:
After this restart your statefulset with the new configuration and it should be it, tell me if this worked