Create manual backups of your ApsaraDB for MongoDB instance and configure custom retention policies.
Prerequisites
An ApsaraDB for MongoDB stand-alone instance, replica set instance, or sharded cluster instance is created.
Usage notes
If you select Physical Backup for an instance running a version earlier than MongoDB 4.0, the backup may fail when the total number of collections and indexes exceeds 10,000. Upgrade the major database version to MongoDB 4.0 or later before performing a physical backup.
After a version upgrade, pre-upgrade backup files cannot be used to create new instances.
Manual backup
Backups are stored in Object Storage Service (OSS) and do not consume your instance storage.
The following table lists the backup methods for each instance type.
|
Instance type |
Backup method |
Description |
|
Snapshot Backup |
Captures the disk state at a point in time. Recovery takes minutes. Note
This process consumes I/O resources from the instance. |
|
|
Note
|
Billing
ApsaraDB for MongoDB provides a free backup storage quota covering full and log backups. Backup storage within the quota incurs no charges. Excess usage is billed as: Hourly backup fee = (Backup storage usage - Free quota) × Unit price.
Free quota by storage type:
|
Storage type |
Free quota |
Usage and quota |
|
Cloud disk-based |
200% of the storage capacity |
View backup storage usage and free quota in the Specification Information section on the Basic Information page. |
|
Local disk-based |
50% of the storage capacity |
Unit prices for excess backup storage:
|
Storage type |
Unit price (USD/GB/day) |
|
Cloud disk-based |
Varies by region:
|
|
Local disk-based |
Varies by region:
|
Full pricing details are available on the ApsaraDB for MongoDB pricing page.
Prices listed here are for reference only and may change. Check the purchase page and your bills for actual pricing.
Create a manual backup
-
Go to the ApsaraDB for MongoDB Replica Set Instances or ApsaraDB for MongoDB Sharded Cluster Instances page. In the top navigation bar, select a resource group and a region, and then click the ID of the target instance.
-
In the upper-right corner of the Basic Information page, click Back up Instance.
-
In the Back up Instance panel, select a Backup Method.
-
In the dialog box, select a Backup Retention Period and click OK.
NoteCustom retention policies are supported only for cloud disk-based instances running MongoDB 4.2 or later.
Available retention policies:
-
Default: Uses the same retention period as the automatic backup policy.
-
Custom: Specify a retention period of 7 to 730 days.
-
Permanent: Retains the backup for the lifetime of the instance. For example, you can create a manual backup at the beginning of a week or month and set it to Never Expires for long-term retention.
After the backup completes, refresh the page to view the backup on the Backup and Restoration page.
-
Extend manual backup retention
Extend the retention period of an existing manual backup.
-
Go to the ApsaraDB for MongoDB Replica Set Instances or ApsaraDB for MongoDB Sharded Cluster Instances page. In the top navigation bar, select a resource group and a region, and then click the ID of the target instance.
-
In the left-side navigation pane, click Backup and Restoration.
-
On the Full Backup tab, find the manual backup whose retention period you want to extend and click Modify Expiration Time in the rightmost column.
-
In the dialog box, set a new expiration date.
Note-
You can only extend the expiration time.
-
Non-expiring backups cannot have their expiration time adjusted. Remove them by clicking Delete.
-
FAQ
API reference
|
API |
Description |
|
Manually backs up an ApsaraDB for MongoDB instance. |