File Export
The file-export
command reads data from a Redis database and writes it to a JSON or XML file, potentially gzip-compressed.
The general usage is:
riotx file-export [OPTIONS] FILE
To show the full usage, run:
riotx file-export --help
JSON
Export to JSON
riotx file-export myexport.json
Sample JSON-export file
[
{"key":"gen:71","event":"scan","time":"2024-11-06T08:23:12.559Z","type":"json","value":"{\"field1\":\"value1\",\"field2\":\"value2\"}"},
{"key":"gen:83","event":"scan","time":"2024-11-06T08:23:12.559Z","type":"hash","value":{"field1":"value1","field2":"value2"}},
{"key":"gen:45","event":"scan","time":"2024-11-06T08:23:12.559Z","type":"set","value":["1","2","3"]}
]
Export to compressed JSON
riotx file-export myexport.json.gz