ApsaraDB for MongoDB automatically backs up data in an instance based on the specified instance backup policy. This topic describes how to configure automatic data backup for an instance.
Prerequisites
A standalone instance, replica set instance, or sharded cluster instance is created.
Precautions
- If the engine version of your instance is earlier than MongoDB 4.0 and the backup method is set to physical backup, physical backups may fail when the total number of collections and indexes in the instance exceeds 10,000. Before you implement a physical backup, upgrade the engine version of your instance to MongoDB 4.0 or later. For more information about how to upgrade the engine version, see Upgrade the major version of an ApsaraDB for MongoDB instance. Important After the upgrade, instance backup files that were generated before the upgrade cannot be used to create instances.
- Single-digit second backup is available only for replica set instances that run MongoDB 5.0 or 4.4.
- Log backup is available only for replica set and sharded cluster instances.
- The retention period of log backups cannot be longer than the retention period of full backups.
- After you disable log backup, log backups are deleted and cannot be restored.
Automatic backup
ApsaraDB for MongoDB stores backup files in Object Storage Service (OSS) buckets instead of ApsaraDB for MongoDB instances.
The following table describes the backup methods for instances of different architectures and engine versions.
Instance | Backup method | Description |
---|---|---|
| Snapshot backup | Snapshot backup retains disk data at a specific point in time and can be used to restore the data within minutes. Note Snapshot backup consumes the I/O resources of instances. |
| Physical backup | Physical backup stores physical database files of instances. Note
|
Billing
ApsaraDB for MongoDB provides free backup quotas. If your backup storage (both full backup and log backup) falls within the free quota, no fees are charged. For excess usage, you are charged based on the following formula: Backup fee per hour = (Backup usage - Free quota) × Fee per backup-hour. The following table describes the billing details.
Storage type | Free quota | View the storage usage and free quota |
---|---|---|
Enhanced SSD (ESSD) | The free quota is equal to 200% of the storage capacity that you purchase for your instance. | You can view the storage usage and free quota in the Specification Information section of the Basic Information page of the instance. |
Local SSD | The free quota is equal to 50% of the storage capacity that you purchase for your instance. |
For more information about the unit price of backups, see the Pricing tab of the ApsaraDB for MongoDB product page.
Procedure
- Log on to the ApsaraDB for MongoDB console.
- In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances based on the instance type.
- In the upper-left corner of the page, select the resource group and region to which the instance belongs.
- Click the ID of an instance, or click
in the Actions column corresponding to the instance and select Manage.
- In the left-side navigation pane of the instance details page, click Backup and Recovery.
- Click the Full Backup tab.
- Specify a backup policy.
FAQ
Q: How do I view the fees incurred for instance backup?
A: You can perform the following steps to view the fees:
- Log on to the ApsaraDB for MongoDB console. In the top navigation bar, choose .
- In the left-side navigation pane, choose .
- Click the Details tab.
- Find BackupStorageSize in the Billing Item column. This is the fees incurred for instance backup.
Related API operations
Operation | Description |
---|---|
DescribeBackupPolicy | Queries the backup policy of an instance. |
ModifyBackupPolicy | Modifies the backup policy of an instance. |