| 用法 | cat data.txt | redis-cli --pipe |
|---|---|
| 协议 | 需为 RESP 或命令格式 |
| 场景 | 批量写入/迁移 |
示例
示例
cat commands.txt | redis-cli -h 127.0.0.1 --pipe导入完成后校验键数量与抽样数据,确认没有中途丢批。
redis-cli --pipe 把标准输入里的 RESP 协议数据批量灌入实例,用于大规模数据导入与迁移场景。
| 用法 | cat data.txt | redis-cli --pipe |
|---|---|
| 协议 | 需为 RESP 或命令格式 |
| 场景 | 批量写入/迁移 |
cat commands.txt | redis-cli -h 127.0.0.1 --pipe