Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (22 sloc) 1.04 KB
Dumps Redis data sets into a format suitable for long-term storage
(currently JSON) and loads data from such dump files back into Redis.
redis-dump ( was there first, but
it is written in Ruby.
The output format is intended to be compatible with redis-dump.
redis-dump-load may be used as a module and also as a command-line tool.
To use it as a module, import it in your program and use the pickle-like
interface: load, loads, dump, dumps. load and dump will stream the data.
To use it as a command-line tool, execute the script. If the basename of
the script contains the word "load", the operating mode will be set to
load data; otherwise the mode will be to dump data. -l may be used to
change the mode to load regardless of what the script is called.
Example hardlink shortcuts:
ln redis-dump
ln redis-load
Symlinks work equally well.
- redis-py (;
- json.
json is part of Python standard library as of 2.6.