标签:echo div stp ash 端口 key res eof rck
#!/bin/bash srchost=111.xx.xx.xx #源地址 srcport=6379 #源端口 srcpass=passwod #密码 srcku=2 #同步的库 desthost=111.x.xx.xx destport=6666 destpass=xxxxx destku=13 redis-cli -h $srchost -p $srcport -a $srcpass -n $srcku keys "*" | while read key do redis-cli -h $srchost -p $srcport -a $srcpass -n $srcku --raw dump $key | perl -pe ‘chomp if eof‘ | redis-cli -h $desthost -p $destport -a $destpass -n $destku -x restore $key 0 echo "migrate key $key" done
标签:echo div stp ash 端口 key res eof rck
原文地址:https://www.cnblogs.com/egrep/p/10084247.html