Skip to main content
Migrating Redis databases to cloud databases

Migrating Redis databases to cloud databases

You can migrate Redis databases to Servercore cloud databases.

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

    export REDISDUMPGO_AUTH=<password>

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

  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> — The IP address or DNS name of the source cluster master host;
    • <port> — port.
  3. Restore the dump to the receiving cluster:

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

    Specify:

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