Creating a DR Task

This section describes how to configure a DR task on the DRS console on a public network using the DR process from MySQL to RDS MySQL as an example.

You can create a DR task that will walk you through each step of the process. After a DR task is created, you can manage it on the DRS console.

Prerequisites

  • You have logged in to the DRS console.
  • Your account balance is greater than or equal to ¥0.
  • The database type is supported. For details, see Real-Time Disaster Recovery.
  • The constraints on disaster recovery are met. For details, see Before You Start.

Procedure

  1. On the Disaster Recovery Management page, click Create Disaster Recovery Task.
  2. On the displayed page, set the task name, recipients, description, and DR instance details. Then, click Next.

    Figure 1 DR task information
    Table 1 Task and recipient description

    Parameter

    Description

    Task Name

    The task name consists of 4 to 50 characters, starts with a letter, and can contain only letters (case-insensitive), digits, hyphens (-), and underscores (_).

    Send Notifications

    This parameter is optional. If this function is enabled, DRS will send notifications to specified recipients based on the mobile numbers and email addresses you provided. If an exception occurs during disaster recovery, the system will send a notification to the specified recipients.

    NOTE:

    Recipients must confirm the subscription on the SMN console within 48 hours of receiving an SMS message or email. Otherwise, they cannot receive notifications from DRS.

    Synchronization Delay Threshold

    During disaster recovery, a synchronization delay indicates a time difference (in seconds) of synchronization between the service and DR database.

    If the synchronization delay exceeds the threshold you specify, DRS will send alarms to the specified recipients. The value ranges from 1 to 3,600. To avoid repeated alarms caused by the fluctuation of delay, an alarm is sent only after the delay has exceeded the threshold for six minutes.

    NOTE:

    Before setting the delay threshold, you need to enter the recipient's mobile number or email address.

    RTO Synchronization Delay Threshold

    If the synchronization delay from the DRS instance to the DR database exceeds the threshold you specify, DRS will send alarms to the specified recipients. The value ranges from 1 to 3,600. To avoid repeated alarms caused by the fluctuation of delay, an alarm is sent only after the delay has exceeded the threshold for six minutes.

    NOTE:

    Before setting the delay threshold, you need to enter the recipient's mobile number or email address.

    RPO Synchronization Delay Threshold

    If the synchronization delay from the DRS instance to the service database exceeds the threshold you specify, DRS will send alarms to the specified recipients. The value ranges from 1 to 3,600. To avoid repeated alarms caused by the fluctuation of delay, an alarm is sent only after the delay has exceeded the threshold for six minutes.

    NOTE:
    • Before setting the delay threshold, you need to enter the recipient's mobile number or email address.
    • In the early stages of an incremental disaster recovery, the synchronization delay is long because a large quantity of data is awaiting synchronization. In this case, no notifications will be sent.

    Description

    The description consists of a maximum of 256 characters and cannot contain the following special characters: !=<>'&"

    Figure 2 DR instance information
    Table 2 DR instance settings

    Parameter

    Description

    DR Type

    Select Single-active.

    The DR type can be single-active or dual-active. If Dual-active is selected, two subtasks are created by default, a forward DR task and a backward DR task.

    Disaster Recovery Relationship

    Select Current cloud as standby. This parameter is available only when you select Single-active.

    By default, Current cloud as standby is selected. You can also select Current cloud as active.

    Current Cloud RDS Instance Role

    Select Active 1 or Active 2. This parameter specifies the role of the current RDS DB instance in the DR relationship and is available when DR Type is set to Dual-active. For details about how to choose active 1 and 2, see How Do I Select Active Database 1 and 2 for Dual-Active DR?

    • Active 1: Initial data is available on the current cloud RDS when a task is created.
    • Active 2: The RDS DB instance on the current cloud is empty when a task is created.

    Service DB Engine

    Select MySQL.

    DR DB Engine

    Select MySQL.

    Network Type

    The public network is used as an example.

    Available options: VPN or Direct Connect and Public network. By default, the value is Public network.

    DR DB Instance

    Select a relational DR instance you have created.

    Service DB Instance

    Select an RDS instance you have created. This parameter is available if you select Current cloud as active.

    Disaster Recovery Instance Subnet

    Select the subnet where the disaster recovery instance is located. You can also click View Subnet to go to the network console to view the subnet where the instance resides.

    By default, the DRS instance and the destination DB instance are in the same subnet. You need to select the subnet where the DRS instance resides and ensure that there are available IP addresses. To ensure that the disaster recovery instance is successfully created, only subnets with DHCP enabled are displayed.

    Destination Database Access

    Select Read-only. This parameter is available only when you select Single-active.

    In single-active disaster recovery, the DR database becomes read-only and cannot be written. To change the database to readable and writable, you click Promote Current Cloud on the Disaster Recovery Monitoring tab. After the DR task is complete or deleted, the DR database becomes readable and writable.

    If an external database has the superuser permission, it can also be read-only when acting as a DR database.

    In dual-active DR, the DR database is set to read-only by default. When the backward task enters the DR state, the database changes from read-only to read-write.

    Tags

    This setting is optional. Adding tags helps you better identify and manage your tasks. Each task can have up to 10 tags.

    After a task is created, you can view its tag details on the Tags tab. For detailed operations, see Tag Management.

  3. On the Configure Source and Destination Databases page, wait until the DR instance is created, and then specify information about the service database, and the DR database. You need to click Test Connection in the Source Database and Destination Database areas to check that the service database and DR database are connected. After the connection tests are successful, select the check box before the agreement and click Next.

    • Select Current cloud as standby for Disaster Recovery Relationship in 2.
      Figure 3 Service database information
      Table 3 Service database information

      Parameter

      Description

      Source Database Type

      By default, Public network self-built database is selected.

      The source database can be a Public network self-built database or an RDS DB instance. After selecting RDS DB instance, you need to select the region where the source database belongs which is different from the region where the destination database is located. The region where the destination database is located is the region where you log in to the management console. Only users in the whitelist can use this function. To use this function, submit a service ticket. In the upper right corner of the management console, choose Service Tickets > Create Service Ticket

      IP Address or Domain Name

      The IP address or domain name of the service database.

      Port

      The port of the service database.

      Range: 1 - 65535

      Database Username

      The username for accessing the service database.

      Database Password

      The password for the service database username. You can change the password if necessary. To change the password, perform the following operation after the task is created:

      If the task is in the Starting, Initializing, Disaster recovery in progress, or Disaster recovery failed status, in the DR Information area on the Basic Information tab, click Update Password next to the Source Database Password field. In the displayed dialog box, change the password. This action only updates DRS with the changed password.

      SSL Connection

      SSL encrypts the connections between the source and destination databases. If SSL is enabled, upload the SSL CA root certificate.

      NOTE:
      • The maximum size of a single certificate file that can be uploaded is 500 KB.
      • If the SSL certificate is not used, your data may be at risk.

      Region

      The region where the service DB instance is located. This parameter is selected by default. This parameter is available only when the source database is an RDS DB instance.

      DB Instance Name

      The name of the service DB instance. This parameter is available only when the source database is an RDS DB instance.

      Database Username

      The username for accessing the service database.

      Database Password

      The password for the service database username.

      • The IP address, domain name, username, and password of the service database are encrypted and stored in DRS and will be cleared after the task is deleted.
      Figure 4 DMQ Information
      Table 4 DMQ Information

      Parameter

      Description

      IP Address or Domain Name

      IP address or domain name of the DMQ service.

      Port

      Port of the DMQ service.

      Username

      Username of the DMQ service.

      Password

      Password of the DMQ service.

      groupID

      Message consumer group of the DMQ service. The system determines how to distribute messages and record the location of the group based on the consumer group.

      queueName

      Message type of the DMQ service.

      Figure 5 DR database information
      Table 5 DR database information

      Parameter

      Description

      DB Instance Name

      The DB instance you selected when creating the DR task and cannot be changed.

      Database Username

      The username for accessing the DR database.

      Database Password

      The password for the database username. The password can be changed after a task is created.

      If the task is in the Starting, Initializing, Disaster recovery in progress, or Disaster recovery failed status, in the DR Information area on the Basic Information tab, click Update Password next to the Destination Database Password field. In the displayed dialog box, change the password. This action only updates DRS with the changed password.

      The database username and password are encrypted and stored in the system, and will be cleared after the task is deleted.

    • Select Current cloud as active for Disaster Recovery Relationship in 2.
      Figure 6 Service database information
      Table 6 Service database information

      Parameter

      Description

      DB Instance Name

      The DB instance you selected when creating the DR task and cannot be changed.

      Database Username

      The username for accessing the service database.

      Database Password

      The password for the database username. The password can be changed after a task is created.

      If the task is in the Starting, Initializing, Disaster recovery in progress, or Disaster recovery failed status, in the DR Information area on the Basic Information tab, click Update Password next to the Source Database Password field. In the displayed dialog box, change the password. This action only updates DRS with the changed password.

      The database username and password are encrypted and stored in the system, and will be cleared after the task is deleted.

      Figure 7 DR database information
      Table 7 DR database information

      Parameter

      Description

      IP Address or Domain Name

      The IP address or domain name of the service database.

      Port

      The port of the service database.

      Range: 1 - 65535

      Database Username

      The username for accessing the service database.

      Database Password

      The password for the service database username. You can change the password if necessary. To change the password, perform the following operation after the task is created:

      If the task is in the Starting, Initializing, Disaster recovery in progress, or Disaster recovery failed status, in the DR Information area on the Basic Information tab, click Update Password next to the Destination Database Password field. In the displayed dialog box, change the password. This action only updates DRS with the changed password.

      SSL Connection

      SSL encrypts the connections between the source and destination databases. If SSL is enabled, upload the SSL CA root certificate.

      NOTE:

      The maximum size of a single certificate file that can be uploaded is 500 KB.

      The IP address, domain name, username, and password of the DR database are encrypted and stored in DRS and will be cleared after the task is deleted.

  4. On the Configure DR page, set the flow control and click Next.

    Parameter

    Description

    Flow Control

    You can choose whether to control the flow.

    • Yes

      You can limit the bandwidth allocated to data replication at any time or during specific time ranges. The default value is All day. A maximum of three time ranges can be set, and they cannot overlap.

      The flow rate must be set based on the service scenario and cannot exceed 9999 Mbit/s.

      Figure 8 Flow control
    • No
      If migration bandwidth is not limited, read performance for the source database may be impacted.
      NOTE:
      • Flow control mode takes effect during the initial DR phase only.
      • You can also change the flow control mode when the task is in the Configuration state. On the Basic Information tab, In the DR Information area, click Modify next to Flow Control. In the dialog box that is displayed, change the flow control mode. The flow control mode cannot be changed for a task that is in Starting state.

  5. On the Check Task page, check the DR task.

    • If any check fails, review the failure cause and rectify the fault. After the fault is rectified, click Check Again.

      For details about how to handle check failures, see the Checking Whether the Source Database Is Connected section in the Data Replication Service User Guide.

      Figure 9 Task check
    • If the check is complete and the check success rate is 100%, go to the Compare Parameter page.

      You can proceed to the next step only when all check items are successful. If any alarms are generated, view and confirm the alarm details first before proceeding to the next step.

  6. Compare the parameters.

    The parameter comparison function helps you check the consistency of common parameters and performance parameters between service and DR databases and show inconsistent values. You can determine whether to use this function based on service requirements. It mainly ensures that services are not affected after the DR task is completed.
    • This process is optional, so you can click Next to skip the comparison.
    • Compare common parameters:
      • For common parameters, if the parameters in the service database are different from those in the DR database, you are advised to click Save Change to make the parameters of the DR database be the same as those in the service database.
        Figure 10 Modifying common parameters
      • Performance parameter values in both the service and DR databases can be the same or different.
        • If you need to adjust the performance parameters, enter the value in the Change To column and click Save Change.
        • If you want to make the performance parameter values of the source and destination database be the same:
          1. Click Use Source Database Value.

            DRS automatically makes the DR database values the same as those of the service database.

            Figure 11 One-click modification

            You can also manually enter the value as required.

          2. Click Save Change.

            DRS changes the DR database parameter values based on your settings. After the modification, the comparison results are automatically updated.

            Some parameters in the DR database cannot take effect immediately, so the comparison result is temporarily inconsistent. Restart the DR database before the DR task is started or after the DR task is completed. To minimize the impact of database restart on your services, restart the DR database at the scheduled time after the disaster recovery is complete.

            For details about parameter comparison, see Parameters for Comparison in the Data Replication Service User Guide.

          3. Click Next.

  7. On the Confirm Task page, specify Start Time, confirm that the configured information is correct and click Submit to submit the task.

    Set Start Time to Start upon task creation or Start at a specified time based on site requirements.

    Starting a DR task may slightly affect the performance of the service and DR databases. You are advised to start a DR task during off-peak hours.

  8. After the task is submitted, view and manage it on the Disaster Recovery Management page.

    • You can view the task status. For more information about task status, see Task Status.
    • You can click in the upper-right corner to view the latest task status.