Collect the following information about the cached data to be migrated (based on Information to be collected for the migration):
redis-cli -h ${redis_address} -p ${port}
Query and record the number of keys in each DB for subsequent migration verification.
The occupied space can be obtained from the value of used_memory_human.
After completing the evaluation, prepare the following items:
These devices are used to copy and transfer data in case of network disconnection (in scenarios with data centers of enterprises).
Apply for ECSs to bear Redis clients. The ECSs are used to export or import cached data.
Recommended ECS specifications are 8 vCPUs | 16 GB or higher.
Create DCS instances based on the migration planning. If the number of instances exceeds the default quota, submit a service ticket or contact technical support.
Collect the contact information of people involved in the migration, server addresses, login credentials, cache instance information, and DB information.
Formulate the overall migration plan, including the personnel arrangement, rehearsal, migration, verification, service switchover, and rollback solutions.
Break down each solution into executable operations and set milestones to mark the end of tasks.
The rehearsal phase aims to:
Before migration, back up related data, including but not limited to cached data and Redis configuration files, in case of emergency.
After conducting one or two rounds of migration rehearsal and solving problems found in the rehearsal, start data migration.
Break down the migration process into executable steps with specific start and end confirmation actions.
Check the following items:
After the service switchover:
If your services are unavailable after the data migration because unexpected problems occur and cannot be solved in the short term, roll back your services.
Since source Redis data still exists, you only need to roll back your services and use the source Redis instances again.
After the rollback, you can continue to restart from the rehearsal or even preparation phase to solve the problems.
The following table lists the information to be collected in the evaluation and preparation phases.
Migration Source |
Item |
Description |
---|---|---|
Source Redis (List the information about all instances to be migrated.) |
Source Redis IP address |
- |
Redis instance password (if any) |
- |
|
Total data volume |
Obtained from the value of used_memory_human by running the info memory command. Used to evaluate whether the migration solution, DCS instance specifications, and available disk space of ECSs meet requirements, and to estimate the time required for migration (service interruption duration). |
|
IDs of DBs with data |
Obtained by running the info keyspace command. Used to check whether the migration involves multiple DBs and non-AOF files. Some open-source tools can export and import data of only one DB at a time. For DCS instances, the single-node and master/standby types provide 256 DBs (DB 0 to DB 255), and the cluster type provides only one DB by default. |
|
Number of keys in each DB |
Used to verify the data integrity after migration. |
|
Data type |
The Cloud Data Migration (CDM) service supports two data formats: hash and string. If the source data contains data in other formats such as list and set, use a third-party migration tool. |
|
ECS If a large number of instances are to be migrated, prepare multiple ECSs for concurrent migration. |
EIP |
Select ECSs that can communicate with DCS instances for data import to ensure network stability. Configure high-specification bandwidth to improve data transmission efficiency. |
Login credentials (username and password) |
- |
|
CPU and memory |
Some migration tools support concurrent import through multiple threads. High-specification ECSs help improve import efficiency. |
|
Available disk space |
Sufficient available disk space needs to be reserved on the ECSs to store compressed files and decompressed cached data files. Note: To improve data transmission efficiency, compress large-size data files before transmitting them to ECSs. |
|
DCS instances (Select appropriate instance specifications and quantities based on the number of source Redis instances and data volume.) |
Instance connection address |
- |
Instance connection port |
- |
|
Instance password |
- |
|
Instance type |
- |
|
Instance specifications and available memory |
- |
|
Network configurations |
VPC |
Plan VPCs in advance to ensure that your service applications and DCS instances are in same VPCs. |
Subnet |
- |
|
Whitelist or security group |
DCS Redis 3.0, 4.0, 5.0, and 6.0 professional edition instances are deployed in different modes. Therefore, the access control methods vary. You can control access to your DCS instances by setting security groups or whitelists. For details, see How Do I Configure a Security Group? or Managing IP Address Whitelist. |
|
... |
... |
Other configurations. |