Code Monkey home page Code Monkey logo

Comments (6)

leprechau avatar leprechau commented on August 23, 2024

The -dump option simply returns the raw decrypted/decompressed output from the Consul API. It is just an easy way to "view" your backup files.

-- Aaron

On Mar 6, 2016, at 10:10 PM, Mat Schaffer [email protected] wrote:

I noticed that the -dump option provides values as base64 encoded.

Would be possible/preferable to display them as straight strings in the dump output?


Reply to this email directly or view it on GitHub.

from consul-backinator.

matschaffer avatar matschaffer commented on August 23, 2024

For sure. My thinking was that if we had multiple backup files it could be useful to see the full set of keys & values to confirm we're reloading the best possible backup. For the time being I came up with this:

> consul-backinator -restore -dump |\
  jq -r '.[] | [.Key, .Value] | @sh' |\
  xargs -I{} -n1 sh -c 'echo $(echo {} | cut -d" " -f1)=$(echo {} | cut -d" " -f2 | base64 -d)'

But it's pretty roundabout compared with what I'm guessing it'd take to have the dump code show decoded values.

Maybe -dump -decode would be better?

from consul-backinator.

leprechau avatar leprechau commented on August 23, 2024

Got it. So instead of just decoding would you actually prefer a "human readable" output? Maybe something in ascii table format?

Something like this ... https://github.com/olekukonko/tablewriter

from consul-backinator.

matschaffer avatar matschaffer commented on August 23, 2024

That sounds like a cool idea. I haven't put much time into brainstorming
formats but so long as it's diffable it should be good.

On Tuesday, 8 March 2016, Aaron Hurt [email protected] wrote:

Got it. So instead of just decoding would you actually prefer a "human
readable" output? Maybe something in ascii table format?


Reply to this email directly or view it on GitHub
#1 (comment)
.

-Mat

matschaffer.com

from consul-backinator.

leprechau avatar leprechau commented on August 23, 2024

I couldn't think of a nice way to use a table or other format with all the possible options for a data payload in a KV store. I settled on just a very simple output format ...

Key: keyName
ValueHere and Here
and Here
Key: someOtherKey
more Values and Stuff

This should be greppable/diffable and give you approximately what you wanted.

from consul-backinator.

matschaffer avatar matschaffer commented on August 23, 2024

Looks fantastic. Thanks!

from consul-backinator.

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.