Verify: migrate from Azure Cache for Redis to KiviDB
Compare key counts. With clustering on Premium or the OSS cluster policy, run INFO keyspace on each shard and add them up; the Enterprise policy endpoint…
Compare key counts. With clustering on Premium or the OSS cluster policy, run
INFO keyspace on each shard and add them up; the Enterprise policy endpoint
answers for all shards.
redis-cli -h my-cache.redis.cache.windows.net -p 6380 --tls -a "$ACCESS_KEY" INFO keyspace
redis-cli -h my-db.cloud.kividb.io -p 6380 --tls --cacert kividb-ca.pem --user kividbapp --pass "$KIVIDB_PASSWORD" INFO keyspace
Keys you skipped (RedisBloom types) make the target's count lower by exactly that many.
Then spot-check random keys with the script in Migrate from Amazon ElastiCache: it compares type, value and TTL, and works with a cluster on either side.
TARGET_CA=kividb-ca.pem python3 verify.py \
"rediss://:$ACCESS_KEY@my-cache.redis.cache.windows.net:6380" \
"rediss://kividbapp:$KIVIDB_PASSWORD@my-db.cloud.kividb.io:6380" 2000
Set SOURCE_CLUSTER=1 for a clustered Premium cache or the OSS cluster policy.
The access key goes after the colon, with no username; URL-encode it if it has
/ or + characters (python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1], safe=""))' "$ACCESS_KEY").