nats-streaming-server icon indicating copy to clipboard operation
nats-streaming-server copied to clipboard

Migration between persistence options (File Store and SQL Store)

Open peteychuk opened this issue 3 years ago • 5 comments

Hey,

Is it possible to migrate from File Store to SQL Store or backward without losing any data?

Thank you in advance.

peteychuk avatar Oct 26 '20 14:10 peteychuk

@peteychuk Unfortunately there is no tool (that I am aware of) to do that.

kozlovic avatar Oct 26 '20 16:10 kozlovic

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 avatar Feb 02 '21 16:02 PBug90

@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.

kozlovic avatar Feb 02 '21 17:02 kozlovic

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 avatar Feb 04 '21 04:02 PBug90

@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).

kozlovic avatar Feb 04 '21 04:02 kozlovic