redis key 迁移


当slave, migrate 等方法不能用时,直接用dump/restore

redis-cli  -h -n 1 keys “*”  | while read key  ;do redis-cli -h -n 1 –raw dump $key  | head -c-1 | redis-cli -n 0 -x restore  $key  0 ;done

This entry was posted on 2018 年 09 月 03 日 and is filed under pplife. Written by: . You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.