Migrating Redis databases to cloud databases
You can migrate Redis databases to Selectel cloud databases.
-
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. -
Create a dump of the source cluster using the redis_dump_go utility:
redis-dump-go \
-host <host> \
-port <port> \
> redis_backup.txtSpecify:
<host>- The IP address or DNS name of the source cluster master host;<port>- port.
-
Restore the dump to the receiving cluster:
redis-cli \
-a <password> \
-h <host> \
-p <port> \
--tls \
--cacert <cacert> \
--pipe \
< redis_backup.txtSpecify:
<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.