Skip to content

RDB-Parser enables users to parse a RDB file(Redis Snapshot file) into XML-formatted file.

License

Notifications You must be signed in to change notification settings

weekend27/RDB-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RDB-Parser

RDB-Parser enables users to parse a RDB file(Redis Snapshot file) into XML-formatted file.

1. What about this tool to do?

use lua to parse rdb file to user's format data, like aof file, json etc.

2. How to use?

$ cd rdbtools/src
$ make
$ ./rdbtools -f ../tests/dump2.8.rdb -s ../scripts/example.lua

3. Options

USAGE: ./rdbtools [-f file] -V -h
    -V --version
    -h --help show usage
    -f --file specify which rdb file would be parsed.
    -s --file specify which lua script, default is ../scripts/example.lua

If you want to handle key-value in rdb file, you can use -s your_script.lua, and lua function handle will be callbacked.

Example can be found in scripts/example.lua, and it just print the key-value.

Json format example

cat scripts/json_exapmle.lua

local cjson = require "cjson"

function handle(item)
     print(cjson.encode(item))
end     

4. Contact me?

Mail: weekend27@163.com

Blog: codetopia

any bugs? send mail, and I will appreciate your help.

About

RDB-Parser enables users to parse a RDB file(Redis Snapshot file) into XML-formatted file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published