This is a python script which could generate a customized dump.rdb file by setting parameters.
Install redis-py, simply:
pip install redis
Edit parameters in parameters.py
.
You can set the num and length of the data you want
If you have a self-defined data structure module, you can:
- run
mkdir modules
to create a folder; - put you module.so in the folder;
- run module commands in
main.py
usingexecute_command()
- start a redis server
- run
main.py
. Be sure that the host address and the port number matches. - get you
dump.rdb
run debug digest
you can get a data digest value of the db.
This could be used for further verification.