redis从db1复制到db3
#!/bin/bashredis-cli -h 127.0.0.1 -p 6379 -a password -n 1 keys “*” | while read keydoredis-cli -h 127.0.0.1 -p 6379 -a password -n 1 --raw dump $key | perl -pe ‘chomp if eof’ | redis-cli -h 127.0.0.1 -p 6379 -a Gobest@redis -n 3 -x restore $key 0ech