Skip to main content

Migrating Redis databases to Managed Databases

You can migrate Redis databases to Servercore Managed Databases.

  1. Connect to Redis. If you are using a password, specify it in an environment variable:

    export REDISDUMPGO_AUTH=<password>

    Specify <password> — user password of the source cluster.

  2. Create a dump of the source cluster using the redis_dump_go utility:

    redis-dump-go \
    -host <host> \
    -port <port> \
    > redis_backup.txt

    Specify:

    • <host> — IP address or DNS name of the source cluster master host;
    • <port> — port.
  3. Restore the dump in the receiving cluster:

    redis-cli \
    -a <password> \
    -h <host> \
    -p <port> \
    --tls \
    --cacert <cacert> \
    --pipe \
    < redis_backup.txt

    Specify:

    • <password> — user password of the target cluster;
    • <host> — IP address or DNS name of the target cluster master host;
    • <port> — port;
    • <cacert> — root certificate.