-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to backup all streams of a NATS Streaming Server? #213
Comments
We do not have a way to do that, each stream goes into back up state independently, message ingest does not pause during snapshots so you'd never get a exact point in time snapshot. You can shut one of the replicas assuming all is R3 or greater and back up its disk - I know not ideal. |
Thank you @ripienaar for your response. Do you have any plan to support the workaround? For example, if the stream name is a wildcard, then the backup command will automatically find the respective streams and backup them. Probably, in a single |
|
Yes. That's what I am planning for now. However, it would have been great if nats has built-in support for this use-case. We can contribute the feature if you are willing to accept. |
yes, should be a easy thing to add to the stream backup command, I'd then take the supplied directory and do |
Let us know if you have bandwidth to do it or need any help from us. It's not an emergency. Btw, thank you for the amazing works. |
We'd love a contribution if you want to give it a go |
Sure. Will do ASAP. |
Maybe an offtopic comment, but just so that I'm not going insane: this issue is about backing up streams in JetStream and not NATS Streaming Server (the precursor to JetStream) right? I'm asking, because I've been searching for information about backups/restores for NATS Streaming Server specifically and to my understanding the NATS Streaming Server doesn't have a concept of streams nor does it really work with the |
This issue relates to JetStream, not Streaming Server indeed. Given that Streaming Server is retiring, yes we did not add extensive support for it in the |
We now have |
Problem:
I have to backup all the streams of my NATS streaming server. I don't know what streams are there. I want to backup all the streams into a single snapshot. Currently, we can backup only a single stream using the following command.
What I have tried so far:
I have tried providing a wildcard instead of
<stream-name>
. It does not work.Possible Workaround:
At first, I can list all the streams using
nats str ls
command. Then, I can loop through all the streams and backup them individualy.However, this does not satisfy my requirement as I want to backup all the streams into a single snapshot. My snapshot should represent a complete state of the NATS streaming server just not a single stream.
The text was updated successfully, but these errors were encountered: