```powershell
#!/bin/bash
redis-cli -h 127.0.0.1 -p 6379 -a password -n 1 keys "*" | while read key
do
redis-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 0
echo "migrate key $key"
done