I\'m trying to import one million lines of redis commands, using the --pipe
feature.
redis_version:2.8.1
cat file.txt | r
To use the pipe mode (a.k.a mass insertion) you must indeed provide your commands directly in Redis protocol format.
The corresponding Redis protocol for LPUSH name joe
is:
*3
$5
LPUSH
$4
name
$3
joe
Or as a quoted string: "*3\r\n$5\r\nLPUSH\r\n$4\r\nname\r\n$3\r\njoe\r\n"
.
This is what your input file must contain.
The Redis documentation includes a Ruby sample to help you generate the protocol: see gen_redis_proto
.