-
# 查看导入的文本文件,里面是具体的Redis命令
- # cat 20180208.txt
- hdel user.user.base 317986
- hdel user.user.base 371149
- hdel user.user.base 370964
- hdel user.user.base 371291
- hdel user.user.base 370906
- hdel user.user.base 371035
- hdel user.user.base 371086
- hdel user.user.base 371042
- hdel user.user.base 370838
- hdel user.user.base 371347
- hdel user.user.base 371065
- hdel user.user.base 371280
- hdel user.user.base 371307
- 在redis-cli客户端工具中,有管道选项
- # redis-cli –help
- –pipe Transfer raw Redis protocol from stdin to server.
- 执行数据导入
- # cat 20180208.txt | /usr/bin/redis-cli –pipe
- All data transferred. Waiting for the last reply...
- Last reply received from server.
- errors: 0, replies: 593
Redis批量导入文本数据
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。