skip to Main Content

I have 3 redis instance with redis. One is the master and the other two, are the slaves. I have connected to master node and get info by redis-cli with INFO command. I can see the parameter cluster_enabled:0 and

#Replication

role:master
connected_slaves:2
slave0:ip=xxxxx,port=6379,state=online,offset=15924636776,lag=1
slave1:ip=xxxxx,port=6379,state=online,offset=15924636776,lag=0

And the keyspace, each node has different dbs. I need to migrate all data to a single memorystore in GCP but I don’t know how. Anyone can help me?

3

Answers


  1. Since the two nodes are slaves and clustering is not enabled, you only need to replicate the master node. RIOT is a great tool for migrating data in and out of Redis.

    However, if you say DB by node do you mean redis DB that you access by select? In that case you’ll need to prefix keys as there may be overlap between the keysets of the DBs.

    Login or Signup to reply.
  2. I think setting up another Redis cluster in a single node configuration is the least of your worries.

    The real challenge for you would be migrating all your records over to the new setup. This is not a simple question to answer and would depend heavily on multiple factors:

    • The total size of your data being migrated
    • Is this is a live Database in production
    • Do you want to keep the two DB schemas in your new configuration separate?
    Login or Signup to reply.
  3. Ok, I believe currently your Redis Instances are hosted on Google Compute Engine.

    And you are looking to migrate to Memorystore for Redis.

    As mentioned here, you can leverage Redis snapshots for this. It provides you step-wise instructions on how to achieve this, leveraging GCS buckets as transient storage.

    import data into Cloud Memorystore instances using RDB (Redis Database Backup) snapshots, as well as back up data from existing Redis instances.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search