This topic describes how to restore one or more databases of an ApsaraDB for MongoDB instance to a new ApsaraDB for MongoDB instance by using a backup created at a specific point in time. This method is ideal for quick data restoration.
Instances created after March 26, 2019 support the restoration of one or more databases. For information about when this feature will be available to instances created before March 26, 2019, follow the official website.
- The instance is created after March 26, 2019.
- The instance is located in the region China (Qingdao), China (Beijing), China (Zhangjiakou-Beijing Winter Olympics), China (Hohhot), China (Hangzhou), China (Shanghai), China (Shenzhen), or Singapore.
- The instance is a replica set instance.
- The database version of the instance is 3.4 or 4.0.
- If the database version of the instance is earlier than required versions, you must upgrade the database version. For more information, see Upgrade the database version of an ApsaraDB for MongoDB instance.
- After the database version is upgraded, the backup files that were generated in the original version cannot be used to restore data in the new version.
- The storage engine of the instance is WiredTiger.
- The backup file list of the instance contains the backup files of the databases you want to restore.
- You can only restore databases from physical backups.
- The time required 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.
While you restore one or more databases, the system creates an instance and you are charged for the new instance. For more information, see Billing items and pricing.
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the region where the source instance resides.
- In the left-side navigation pane, click Replica Set Instances.
- Find the source instance and click its ID.
- In the left-side navigation pane, click Backup and Recovery.
- On the Backup and Recovery page, click Create Instance By Time Point.
- In the dialog box that appears, configure the following parameters.
Parameter Description Select recovery time point Select a point in time from which you want to restore data. You can select any time from the last seven days.Note The time you select must be earlier than the current time and later than the time when the source instance was created. Select databases to recover
- All Databases: If you select this option, all databases in the source instance are restored.
- Select Databases: If you select this option, only selected databases are restored.
You can directly select the databases you want to restore, or click Enter Databases to enter the names of the databases.Note If you want to restore more than one database, separate the database names with commas (,) when you enter them.
- Click OK.
- On the Instance Purchase page that appears, select a billing method for the new instance.
- 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 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.
- Configure the new instance. For more information, see Create a replica set instance.
- You cannot change Region, Database Version, Storage Engine, and Replication Factor for the new instance.
- To make sure that the new instance has sufficient space to store the data restored from the source instance, we recommend that you select a storage capacity greater than or equal to that of the source instance.
- Click Buy Now.
- On the Confirm Order page, read and select ApsaraDB for MongoDB Agreement of Service, and complete the payment as prompted.