Create a disaster recovery instance

Updated at:

The disaster recovery feature for ApsaraDB for MongoDB provides geo-redundancy, supporting scenarios that include disaster recovery, multi-active deployments, and data synchronization. This topic describes how to create a disaster recovery instance in the ApsaraDB for MongoDB console.

Note The disaster recovery feature has been discontinued. In the future, Data Transmission Service (DTS) will be used to support disaster recovery, active-active, and multi-active architectures.

Limitations

  • Only replica set instances support the disaster recovery feature. Standalone instances and sharded cluster instances are not supported.
  • The source instance must run MongoDB 3.2 or 3.4. MongoDB 4.0 is not supported.
  • The source instance must use the WiredTiger engine.
  • You cannot create a disaster recovery relationship between two existing ApsaraDB for MongoDB instances.
  • Data synchronization is supported only between two ApsaraDB for MongoDB instances.
  • After synchronization starts, DDL changes on the source instance are not synchronized to the destination instance.

Supported regions for disaster recovery

For more information, see Regions that support disaster recovery.

Considerations

Before the destination instance is created, the system restarts the source instance to add a global transaction identifier (gid) to its oplog.

Note If the source instance contains a large amount of data, the restart process can take several minutes. Ensure your application has a reconnection mechanism and perform this operation during off-peak hours.

Billing

  • This operation creates a disaster recovery instance. No fees are charged for the disaster recovery instance itself or for data synchronization traffic.
  • This operation also provisions a new ApsaraDB for MongoDB instance, which is charged separately. For more information, see Billing items and pricing.

Procedure

  1. Log in to the ApsaraDB for MongoDB console.
  2. In the left-side navigation pane, click Disaster Recovery on Cloud.
  3. In the upper-right corner of the page, click Create Disaster Recovery Instance.
  4. In the Create Disaster Recovery Instance dialog box, configure the parameters for the source and destination instances. A red warning message is displayed at the bottom of the dialog box: "Before the destination instance is created, the source database instance will be restarted. Please make sure that your application has a reconnection mechanism." After confirming the information, click OK.
    Parameter Description
    Source region Select the region where the source instance is located.
    Source instance Select the ID of the source instance.
    Destination region Select the region for the destination instance.
    Destination zone Select the zone for the destination instance.
    Network type Select a network type. Valid values are Classic Network and VPC.
    • Classic Network: Cloud services in the Classic Network are not isolated. You can only use security groups or IP address whitelists to prevent unauthorized access.
    • VPC (Recommended): A Virtual Private Cloud (VPC) is an isolated network environment that provides higher security and performance than the Classic Network. You must create a VPC and a vSwitch in advance. For more information, see Create a VPC and a vSwitch.
    Note Data synchronization between the source and destination instances uses a dedicated channel. Therefore, your network type selection does not affect the process.
    Destination billing method Select a billing method for the destination instance. Valid values are Pay-As-You-Go and Subscription.
    • Pay-As-You-Go: You are billed hourly for the instance configuration, and fees are deducted from your account balance.
    • Subscription: This is a prepaid method. You pay for the instance when you create it.

    For more information, see Billing items and pricing.

    Disaster recovery remarks Enter a description for the disaster recovery instance.
    Note
    • The destination MongoDB instance is a three-node replica set instance.
    • The destination instance inherits the IP address whitelist settings from the source instance.
    • The storage engine, database version, specifications, and storage space of the destination instance are automatically configured to match the source instance.
  5. Click OK.
  6. Select the ApsaraDB for MongoDB Terms of Service checkbox and complete the payment as prompted.
  7. Wait for the disaster recovery instance to complete data synchronization.

Next steps

You must set a password for the newly created destination instance. For more information, see Set a password.