All Products
Search
Document Center

Data Management:Back up an ApsaraDB for MongoDB instance from a secondary database

Last Updated:Mar 28, 2026

Data Disaster Recovery reads data from secondary databases for full backup to reduce the impact on primary databases.

This feature requires an ApsaraDB for MongoDB replica set instance. Only logical backup is supported.

Supported deployment locations

Data Disaster Recovery supports the following deployment locations for the source instance:

Deployment locationConfiguration notes
ApsaraDB for MongoDBConfigure only the MongoDB Instance ID. The system automatically reads from the secondary database. See Manage a backup schedule.
User-Created Database with Public IP Address \<IP Address:Port Number\>Configure primary and secondary endpoints manually. Peer VPC is not required.
Express Connect DB/VPN Gateway/Intelligent GatewayConfigure primary and secondary endpoints manually. Peer VPC is required.
No public network IP: Port's self-built database (accessed through the database gateway)Configure primary and secondary endpoints manually.

Prerequisites

Before you begin, ensure that you have:

Configure backup from a secondary database

The following steps use Express Connect DB/VPN Gateway/Intelligent Gateway as the deployment location. The configuration is similar for other deployment locations.

  1. Log on to the DMS console V5.0.

  2. In the top navigation bar, choose Security and Specifications (DBS) > Disaster Recovery for Data (DBS) > Backup Plan.

    In simple mode, hover over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All Features > Security and Specifications (DBS) > Disaster Recovery for Data (DBS) > Backup Plan.
  3. On the Backup Schedules page, find the backup schedule you want to configure and click Configure Backup Schedule in the Actions column.

  4. In the Configure Backup Source and Destination step, configure the parameters in the following tables and click Next.

    For large data volumes, consider purchasing a subscription storage plan to reduce costs compared to pay-as-you-go billing. See Use storage plans.

    General

    ParameterDescription
    Schedule NameThe name of the backup schedule. Data Disaster Recovery auto-generates a name. Enter a descriptive name for easier identification. Names do not need to be unique.

    Backup source information

    ParameterDescription
    Backup ModeThe backup method. Set this to Logical Backup.
    Database LocationThe access method for the source database. Select Express Connect DB/VPN Gateway/Intelligent Gateway.
    Database TypeThe type of the source database. Default value: MongoDB.
    Peer VPCThe virtual private cloud (VPC) where the source database is deployed. Not required if Database Location is set to User-Created Database with Public IP Address.
    Configuration of connection address of standby databaseSpecifies whether to configure the secondary database connection address. Set this to Yes to enable backup from a secondary database. If set to No, the Alternate address and Alternate port number parameters are not required.
    Master AddressThe endpoint for the primary database.
    Master Port NumberThe port for the primary database.
    Alternate addressThe endpoint for the secondary database. Required when Configuration of connection address of standby database is set to Yes.
    Alternate port numberThe port for the secondary database. Required when Configuration of connection address of standby database is set to Yes.
    Database NameThe name of the source database.
    Master Database AccountThe username for the source database account.
    Master PasswordThe password for the source database account. After entering credentials, click Test Connection to verify connectivity. Test Passed confirms a successful connection. If Test Failed appears, click Check next to it and adjust the configuration based on the results.
    Compliance warranty regarding cross-border data transfersSelect the check box to agree to the compliance commitment.

    Backup destination information

    ParameterDescription
    Backup Storage TypeThe storage type for backup data. DBS Storage (recommended): Backup data is stored in Data Disaster Recovery without requiring an Object Storage Service (OSS) bucket. Charges are based on stored data volume. See Storage fees. OSS For User: You must create an OSS bucket in advance. See Create buckets. Only the standard storage class is supported.
    OSS Bucket NameThe OSS bucket to store backup data. Appears only when Backup Storage Type is set to OSS For User.
    Storage EncryptionThe encryption method for stored data. Encrypted (recommended): Data Disaster Recovery uses AES-256 encryption. For OSS, server-side encryption is applied — objects are encrypted on upload and decrypted on download. See Server-side encryption. Non-encrypted: Data is stored without encryption.
  5. In the Edit Backup Objects step, find the database or collection to back up, add it to the Selected section, and click Next.

    • Data Disaster Recovery supports backing up a single collection, a single database, or multiple databases.

    • Click Select All in the lower-left corner of the Available section to select all databases.

    • Databases created after the backup schedule was created are not backed up by default. To include them, add them manually on the Configure Task page. See Modify backup objects.

    • For supported database types, see Supported database types and features.

  6. In the Configure Backup Time step, configure the parameters in the following table and click Next.

    ParameterDescription
    Full-scale Backup FrequencyThe backup frequency. Periodic Backup: runs on a recurring schedule. Single Backup: runs once.
    Full Data Backup RecurrenceThe days of the week on which Data Disaster Recovery runs the backup. Select at least one day. Appears only when Full-scale Backup Frequency is set to Periodic Backup.
    Start AtThe start time for the backup. Schedule during off-peak hours, for example, 01:00. If a previous full backup is still running at the scheduled start time, the next backup is skipped.
    Incremental BackupSpecifies whether to enable incremental backup. Appears only when Full-scale Backup Frequency is set to Periodic Backup.
    Maximum Concurrent Threads for Full Data BackupThe maximum number of concurrent threads for a full backup. Reduce this value to minimize the impact on database performance during backup.
  7. In the Edit Lifecycle step, configure the retention period for full backup data in the Configure Full Data Backup Lifecycle section. If you set Incremental Backup to Enable in the previous step, also configure the retention period for incremental backup data. See How do I manage the lifecycle rules of backup sets?

  8. Click Precheck in the lower-right corner.

  9. After Precheck Passed is displayed, click Start Task.

What's next