1. Editing config file
In target Redis's config file set
slaveof sourceIP sourcePort slave-read-only no
It will efficiently replicate source db into your new one by transmitting RDB file. Then you can comment out these lines and shut down source instance. Note, that old keys in target instance are not preserved and not rewritten.
Will not help you on this, sad story.
127.0.0.1:6371> CONFIG SET slaveof "localhost 6370"
(error) ERR Unsupported CONFIG parameter: slaveof
MIGRATE remotehost remoteport "" 0 5000 COPY KEYS *
Will not work either. But there is a workaround: https://stackoverflow.com/a/42686861/78569
redis-cli --raw KEYS '*' | xargs redis-cli MIGRATE my.redis 6379 "" 0 5000 KEYS
(please upvote that guy, if you used it)
4. Shell scripting
Here's a script that pipes KEYS output into MIGRATE and adds some other features: https://gist.github.com/nicStuff/ee7feb8eed00174a46db42812545b403
5. RDB download
You can download RDB dump with Redis protocol even if you don't have access to the file on server:
redis-cli -h <host> -p <port> --rdb /path/to/local/copy/dump.rdb
dump.rdbfile?