GithubHelp home page GithubHelp logo

Comments (11)

ripienaar avatar ripienaar commented on June 19, 2024

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.

from natscli.

hossainemruz avatar hossainemruz commented on June 19, 2024

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 *.tgz file but one file for each stream is also fine.

from natscli.

ripienaar avatar ripienaar commented on June 19, 2024
for stream in $(nats s ls -j|jq -r '.[]')
do
  nats stream backup ....
done

from natscli.

hossainemruz avatar hossainemruz commented on June 19, 2024

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.

from natscli.

ripienaar avatar ripienaar commented on June 19, 2024

yes, should be a easy thing to add to the stream backup command, I'd then take the supplied directory and do dir/<stream name>/backup files... so you get a series of stream backups in one dir. Today each backup has to be in a dir of its own

from natscli.

hossainemruz avatar hossainemruz commented on June 19, 2024

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.

from natscli.

ripienaar avatar ripienaar commented on June 19, 2024

We'd love a contribution if you want to give it a go

from natscli.

hossainemruz avatar hossainemruz commented on June 19, 2024

Sure. Will do ASAP.

from natscli.

joelhoisko avatar joelhoisko commented on June 19, 2024

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 nats CLI tool either. Or am I missing something here?

from natscli.

ripienaar avatar ripienaar commented on June 19, 2024

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 nats cli

from natscli.

ripienaar avatar ripienaar commented on June 19, 2024

We now have nats account backup that does this.

from natscli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.