Redis Managed Database

August 24, 2019 210 views
Redis Databases

Hello Everyone

I’m planning to migrate to Redis managed database once it is available in my current datacenter.

For the people whom already tried it, can you share your experience so far (I know it’s less than a week but let me know what do you think, did you move your production Redis or waiting? did you noticed any limitation or issues?)

Also, can I use Redis managed database to host my queue? I already use Redis queues in my own Redis and not sure if it’s supported in the managed Redis (nothing mentioned in the documentation)

1 Answer

Hello Everyone

I just finished the migration from Redis single instance to DO Redis Managed Database, everything went smooooooth :)

In case someone interested to copy his Redis data to another Redis server (aka DO Redis managed database) the below script will help you to do that


# Credit goes to Elliot Chance

# Small change is done by AhmadT (ahmadt a.t.

if [ $# -eq 0 ]; then
  echo "select a db"
  exit 1

export DBnumber="$1"

echo "DB ${DBnumber}"

export OLD="redis-cli -n ${DBnumber}"
export NEW="redis-cli -n ${DBnumber} -p MYPORT -a PASSWORD"

for KEY in $($OLD --scan); do
    $OLD --raw DUMP "$KEY" | head -c-1 > /tmp/dump
    TTL=$($OLD --raw TTL "$KEY")
    case $TTL in
            $NEW DEL "$KEY"
            $NEW DEL "$KEY"
            cat /tmp/dump | $NEW -x RESTORE "$KEY" 0
            $NEW DEL "$KEY"
            let TTLEX="$TTL*1000"
            cat /tmp/dump | $NEW -x RESTORE "$KEY" "$TTLEX"
    echo "$KEY (TTL = $TTL)"

Have another answer? Share your knowledge.