Redis-cli --csv option (exporting to csv)

后端 未结 5 2017
轻奢々
轻奢々 2021-02-02 12:34

I would like to export a subset of my Redis data on the slave to a csv file. I notice a new csv output option was added to redis-cli but I am unable to find documentation of ho

5条回答
  •  失恋的感觉
    2021-02-02 13:05

    Cutting edge!

    I've just looked at the source code & all it does is output the commands as comma separated values to stdout. Which is no big surprise.

    So you could just redirect it to a file, in the standard way, as long as you're on Linux?

    e.g./

    redis-cli --csv your-command > stdout.csv 2> stderr.txt
    

提交回复
热议问题