Updated on 2022-02-21 GMT+08:00

Migrating Data Online

Scenario

If the source and target instances are interconnected and the SYNC and PSYNC commands are supported in the source instance, data can be migrated online in full or incrementally from the source to the target.

Prerequisites

Before migrating data, read through Introduction to Migration with DCS to learn about the DCS data migration function and select an appropriate target instance.

Step 1: Obtain the Source Instance Name and Password

Obtain the name and password of the source Redis instance.

Step 2: Prepare the Target DCS Redis Instance

  • If a target DCS Redis instance is not available, create one first. For details, see Creating a DCS Redis Instance.
  • If a target instance is available, you do not need to create a new one. However, you must clear the instance data before the migration. For details, see Clearing DCS Instance Data.

Step 3: Check the Network Between the Source and Target Instances

  1. Check whether the source and target instances are in the same VPC.

    If yes, go to Step 4: Create a Migration Task. If no, go to 2.

  2. Check whether the VPCs of the source and target instances are connected.

    If yes, go to 1. If no, create a VPC peering connection. For details, see "VPC Peering Connection" section in the VPC User Guide.

Step 4: Create a Migration Task

  1. Log in to the DCS console.
  2. In the navigation pane, choose Data Migration.
  3. Click Create Online Migration Task.
  4. Specify Task Name and Description.
  5. Select a VPC and security group.
  6. Click Next.
  7. Click Submit.
  8. Wait for several minutes. After the status of the migration task changes to Configuration pending, click Configure in the Operation column.
  9. Specify Migration Type.

    Supported migration types are Full and Full + incremental, which are described in Table 1.

    Table 1 Migration type description

    Migration Type

    Description

    Full

    Suitable for scenarios where services can be interrupted. Data is migrated at one time. Source instance data updated during the migration will not be migrated to the target instance.

    Full + incremental

    Suitable for scenarios requiring minimal service downtime. The incremental migration parses logs to ensure data consistency between the source and target instances.

    You can manually stop an ongoing migration.

    If you select this type, configure Bandwidth Limit.

  10. For source Redis, select the instance prepared in Step 1: Obtain the Source Instance Name and Password.

    If the instance is password-protected, you can click Test Connection to check whether the instance password meets the requirements.

  11. For Target Instance, select the DCS Redis Instance prepared in Step 2: Prepare the Target DCS Redis Instance.

    If the instance is password-protected, you can click Test Connection to check whether the instance password meets the requirements.

  12. Click Next.
  13. Confirm the migration task details and click Submit.

    Go back to the data migration task list. After the migration is successful, the task status changes to Successful.

    If the migration type is full+incremental, the migration task status will remain Migrating until you click Stop.