We have two Azure Redis instances on Azure. The source is on "standard" setting in Azure. We need to copy all 35GB from a standard build to a premium build (not migrate).
What is the best method? The data should be static. You cannot export the data in standard, you cannot shard either. We have maxed out the size, and need to move to one that supports sharding.
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)
Here's a script that pipes KEYS output into MIGRATE and adds some other features: https://gist.github.com/nicStuff/ee7feb8eed00174a46db42812545b403
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
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With