High-frequency backup takes snapshot backups of your ApsaraDB for MongoDB instance at intervals as short as 15 minutes for replica set instances and 30 minutes for sharded cluster instances, reducing your recovery point objective (RPO) to near-zero compared to the once-daily default backup schedule.
Regular backup vs. high-frequency backup
| Regular backup | High-frequency backup | |
|---|---|---|
| Backup frequency | Once per day | Every 15 min–12 h (replica set) / 30 min–12 h (sharded cluster) |
| Minimum RPO | Up to 24 hours | As low as 15 minutes |
| Snapshot retention | Up to 730 days | 1–7 days (high-frequency) + up to 730 days (full backup) |
| Best for | Standard workloads with low change rates | Mission-critical databases that cannot tolerate large data loss |
Prerequisites
Before you begin, make sure you have:
-
A replica set instance or sharded cluster instance
-
MongoDB 4.2 or later running on the instance
-
Enterprise SSDs (ESSDs) as the instance storage type
Billing
ApsaraDB for MongoDB includes free backup storage equal to 200% of the instance's storage capacity for instances that use ESSDs. Backup storage that exceeds this quota is billed daily based on the unit price of backup storage. For pricing details, see the Pricing tab on the ApsaraDB for MongoDB product page.
Backup retention policies
High-frequency backup uses the snapshot backup method. Retention behavior depends on the snapshot frequency and whether hourly sparse backup is enabled.
| Snapshot frequency | Hourly sparse backup | Retention policy |
|---|---|---|
| Minutes | Enabled | All snapshots from the past 1 hour are kept. Snapshots older than 1 hour but within the high-frequency retention period are thinned to the first snapshot per day after 00:00:00. Snapshots beyond the retention period are also kept at one per day. |
| Minutes | Disabled | All snapshots within the high-frequency retention period are kept. Snapshots beyond the retention period are kept at one per day. |
| Hours | N/A | All snapshots within the high-frequency retention period are kept. Snapshots beyond the retention period are kept at one per day. |
Examples
Minutes + hourly sparse backup enabled
Settings: 30-minute frequency, 2-day (48-hour) high-frequency retention, 30-day full backup retention.
-
Past 1 hour: 2 snapshots retained
-
1–48 hours ago: 47 snapshots retained (one per day)
-
Beyond 48 hours: 28 snapshots retained (one per day)
-
Total: up to 77 snapshots within 30 days
Minutes + hourly sparse backup disabled
Settings: 30-minute frequency, 2-day (48-hour) high-frequency retention, 30-day full backup retention.
-
Past 48 hours: 96 snapshots retained
-
Beyond 48 hours: 28 snapshots retained (one per day)
-
Total: up to 124 snapshots within 30 days
Hours
Settings: 6-hour frequency, 2-day (48-hour) high-frequency retention, 30-day full backup retention.
-
Past 48 hours: 8 snapshots retained
-
Beyond 48 hours: 28 snapshots retained (one per day)
-
Total: up to 36 snapshots within 30 days
Performance considerations
High-frequency backup has minimal impact on instance performance. The feature is supported only by instances that use cloud disks.
-
Backup node: Backups run only on secondary or hidden nodes and do not affect the primary node.
-
Physical backup optimization: High-frequency backup relies on physical backup at the kernel level. ApsaraDB for MongoDB optimizes physical backup to skip expensive operations such as fsync and WiredTiger checkpoint writes.
-
Disk snapshot overhead: Disk snapshot creation has a low overhead. For details, see Snapshot overview.
FAQ
When does the first backup task run after high-frequency backup is enabled?
Backup tasks are triggered on the hour. For example, with a 15-minute interval, tasks fire at 00:00, 00:15, 00:30, 00:45, 01:00, and so on. When switching from regular backup to high-frequency backup, if the time elapsed since the last backup exceeds the configured interval, a backup task starts immediately. Subsequent tasks then follow the on-the-hour schedule.
For example: the last regular backup ran at 09:00. You switch to high-frequency backup with a 15-minute interval at 09:20. Because 20 minutes have elapsed since 09:00, a backup starts immediately at 09:20. The next tasks follow the standard schedule: 09:30, 09:45, 10:00, and so on.
Does high-frequency backup affect instance performance?
The impact is small. Backups run only on secondary or hidden nodes, so the primary node is not affected. For technical details, see Performance considerations.
API reference
| Operation | Description |
|---|---|
| DescribeBackupPolicy | Query the backup policy of an ApsaraDB for MongoDB instance. |
| ModifyBackupPolicy | Modify the backup policy of an ApsaraDB for MongoDB instance. |