redis2json
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 800B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
12345678910111213141516171819202122232425262728
  1. # redis2json
  2. `redis2json` is a simple _(dependency free!)_ lua script which runs directly in redis.
  3. ## usage
  4. ### export redis db to json file
  5. redis-cli --eval redis2json.lua > /tmp/redis.json
  6. ### redis to couchdb
  7. # create a couchdb database named "redis"
  8. curl -X PUT http://127.0.0.1:5984/redis
  9. # export redis keys and import than in couchdb database "redis"
  10. redis-cli --eval "redis2json.lua" | POST -sS "http://127.0.0.1:5984/redis" -c "application/json"
  11. ## limitations
  12. 1. Currently redis2json only supports keys with `TYPE`
  13. * `string`
  14. * `list`
  15. 2. There are proper ways to get a json string from you redis db
  16. * [rdb-rs](https://github.com/badboy/rdb-rs)
  17. * [redis-rdb-tools](https://github.com/sripathikrishnan/redis-rdb-tools)
  18. Feel free to help and improve it!