CLI to convert a TOML file to an RDB (Redis Database) file.
Set Redis version in the environment (default = 7 if unset):
export REDIS_VERSION=7.2
Run with TOML input:
cat input.toml | toml-to-rdb > output.rdb
or with gzipped TOML input:
cat input.toml.gz | toml-to-rdb -g > output.rdb
TOML files containing (unnested) key-value, key-table, and key-set pairs are supported. For example, the following TOML content:
title = "TOML File"
[table]
k = "v"
set = [ a, b ]
would result in a Redis database with:
- Key
titlehaving valueTOML File - Key
tablehaving a hash value with keykand valuev - Key
sethaving a set value with itemsaandb