This topic describes how to restore data to a new ApsaraDB for MongoDB instance by point in time. This method is ideal for data restoration and verification.

Prerequisites

  • The source instance is a replica set or sharded cluster instance.
  • You can only select a point in time from the last seven days.

Billing

This method creates an instance and you are charged for the new instance. For more information, see Billing items and pricing.

Note If you want to restore data to a pay-as-you-go instance, make sure that your account has sufficient balance.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the region where the source instance resides.
  3. In the left-side navigation pane, click Replica Set Instances or Sharding Instances.
  4. Find the source instance and click its ID.
  5. In the left-side navigation pane, click Backup and Recovery.
  6. On the Backup and Recovery page, click Create Instance By Time Point.
  7. In the Create Instance By Time Point dialog box that appears, select the target point in time and click OK.
    Note
    • To ensure data integrity and accuracy, do not select the latest point in time (usually the latest hour) if the instance is a sharded cluster instance. If you do so, restoration fails.
    • After you upgrade the database engine version of your ApsaraDB for MongoDB instance, the backup files that were generated in the original version cannot be used to restore data in the new version.
  8. On the Instance Purchase page that appears, select a billing method for the new instance.
    Note
    • Subscription: You must pay the subscription fee when you create an instance. We recommend that you select this billing method for long-term use, because it is more cost-effective than the pay-as-you-go billing. Longer subscription periods have larger discounts.
    • Pay-as-you-go: A pay-as-you-go instance is charged at an hourly rate based on your actual resource usage. We recommend that you select this billing method for short-term use. You can reduce costs by releasing your pay-as-you-go instance after you no longer need it.
  9. Configure the new instance. For more information, see Create a replica set instance or Create a sharded cluster instance.
    Note
    • Replica set instance: The storage capacity of the new instance must be greater than or equal to that of the source instance.
    • Sharded cluster instance:
      • The number of shards in the new instance must be greater than or equal to that in the source instance.
      • The storage capacity of each shard in the new instance must be greater than or equal to those in the source instance.
  10. Click Buy Now.
  11. Read and select ApsaraDB for MongoDB Agreement of Service, and complete the payment as prompted.
    Note The time required to restore data to a new instance by point in time varies depending on factors such as the data volume, task queue status, and network conditions. When the status of the new instance changes to Running, the restoration is complete.