nats-streaming-server
nats-streaming-server copied to clipboard
Migration between persistence options (File Store and SQL Store)
Hey,
Is it possible to migrate from File Store to SQL Store or backward without losing any data?
Thank you in advance.
@peteychuk Unfortunately there is no tool (that I am aware of) to do that.
Is it possible to spin up a new node that has SQL store configured, join the cluster, and step by step add more SQL nodes until file store nodes are no longer needed?
@PBug90 Since with latest releases there is a way to add/remove nodes with system admin messages, it may be a way to do that! Now, keep in mind that in cluster mode, we still need file storage for the RAFT logs (these have not been implemented to be backed by SQL), so usually users don't go the cluster-mode with SQL. But if that limitation is not an issue for you, your approach seem promising, although I have not tested it.
Do you have plans on implementing SQL as a persistence layer for RAFT messages aswell or are there major caveats that would render it inefficient?
@PBug90 There is no plan at the moment. Note that JetStream is our new persistence product, and that's where most of new dev will go, not to say that we won't add new features to NATS Streaming, but this is not the priority. However, JetStream is also RAFT based but does not have SQL support at all at the moment (either for RAFT or NATS messages).