tencent cloud

Feedback

Data Backup

Last updated: 2024-01-15 14:40:06
    To avoid data loss caused by system crashes or other problems, TencentDB for MongoDB supports data backup and rollback after system recovery to ensure data integrity.

    Overview

    Backup types
    Automatic backup: Data is automatically backed up as scheduled based on the system's default backup policy (such as default backup interval and mode).
    Manual backup: You can run a backup task at any time to meet your business Ops and troubleshooting requirements.
    Backup modes
    Physical backup: In this mode, physical database files in an instance are backed up, which is fast and easy to restore with a high success rate. However, it has no portability, and the backup environment and restoration environment must be completely the same.
    Logical backup: In this mode, the database instance is connected to, and the mongodump tool is used to save the operation logs to a logical backup file to back up the data, which can be restored by replaying the operation logs. This mode is slow but has a high portability. You can restore the logical backup of a database to database on different versions.

    Use Limits

    A backup can contain up to 7 days of continuous data; that is, you can roll back data to any time point in the last 7 days.

    Note

    Instance backup doesn't affect your business.
    Backup files are stored in COS without using the storage space of TencentDB for MongoDB instances. For more information on COS, see Cloud Object Storage (COS).

    Version Description

    Version
    Instance Type
    Automatic backup
    Manual backup
    v3.2
    Replica Set
    Default backup mode: Logical backup
    Supported backup modes: Logical backup
    Default backup mode: Logical backup
    Supported backup modes: Logical backup
    Sharded cluster
    Default backup mode: Logical backup
    Supported backup modes: Logical backup
    Default backup mode: Logical backup
    Supported backup modes: Logical backup
    v3.6
    Replica Set
    Default backup mode: Logical backup
    Supported backup modes: Logical backup
    Default backup mode: Logical backup
    Supported backup modes: Logical backup
    Sharded cluster
    Default backup mode: Logical backup
    Supported backup modes: Logical backup
    Default backup mode: Logical backup
    Supported backup modes: Logical backup
    v4.0 and later
    Replica Set
    Default backup mode: Logical backup
    Supported backup modes: Logical backup and physical backup
    Default backup mode: Logical backup
    Supported backup modes: Logical backup and physical backup
    Sharded cluster
    Default backup mode: Logical backup
    Supported backup modes: Logical backup and physical backup
    Default backup mode: Logical backup
    Supported backup modes: Logical backup and physical backup

    Billing Overview

    Currently, backup is free of charge. We will notify you when billing for the backup space officially starts.

    Prerequisites

    You have created a TencentDB for MongoDB instance. For more information, see Creating TencentDB for MongoDB Instance.
    The TencentDB for MongoDB replica set or sharded cluster instance is in Running status.

    Adjusting the automatic backup policy

    2. In the MongoDB drop-down list on the left sidebar, select Replica Set Instance or Sharded Cluster Instance. The directions for replica set instances and sharded instances are similar.
    3. Above the Instance List on the right, select the region.
    4. In the instance list, find the target instance.
    5. Click the target instance ID to enter the Instance Details page.
    6. Select the Backup and Rollback > Backup Task List page.
    7. Select the Auto-Backup Settings tab and click Edit.
    8. Edit Backup Mode and Backup Start Time based on the parameter descriptions in the following table.
    9. Click Save.
    Parameter
    Note
    Data Backup Retention
    Data backup files can be retained for 7 days by default.
    Backup modes
    (Optional) Select the backup mode.
    TencentDB for MongoDB 3.6 replica set instances don't support this parameter.
    Backup Start Time
    The default start time is 10:00 PM–02:00 AM; that is, the system starts the backup task between 10:00 PM and 02:00 AM every day.
    You can select a different time period to start data backup as needed by your business.
    The specific start time varies by the specific scheduling of the backup task.

    Manual Backup

    2. In the MongoDB drop-down list on the left sidebar, select Replica Set Instance or Sharded Cluster Instance. The directions for replica set instances and sharded instances are similar.
    3. Above the Instance List on the right, select the region.
    4. In the instance list, find the target instance.
    5. Click the target instance ID to enter the Instance Details page.
    6. In the top-right corner of the Instance Details page, click Manual Backup.
    7. (Optional) Select the backup mode. TencentDB for MongoDB 3.6 replica set instances don't support this parameter.
    8. Add remarks and click OK.

    Downloading a backup file

    2. In the MongoDB drop-down list on the left sidebar, select Replica Set Instance or Sharded Cluster Instance. The directions for replica set instances and sharded instances are similar.
    3. Above the Instance List on the right, select the region.
    4. In the instance list, find the target instance.
    5. Click the target instance ID to enter the Instance Details page.
    6. Select the Backup and Rollback > Backup Task List page.
    7. In the Backup Task List, find the target file and click Download in the Operation column.
    8. In the Generate Backup File pop-up window, read the backup note carefully and click OK.
    9. Select the File Download List tab and view the backup task progress.
    10. After the task execution is completed, you can back up the data to your local device and view it as follows:
    Over public network: Click Download from Public Network in the Operation column and directly use the browser to download the backup to your local device.
    Over private network: Copy the private network address and run a wget command wget -c 'private network address' -O backup.tar in a CVM instance to download the backup at a high speed over the private network. For detailed directions on how to log in to CVM, see Customizing Linux CVM Configurations.

    Related APIs

    API Name
    Description
    DescribeDBBackups
    CreateBackupDBInstance
    DescribeBackupDownloadTask
    CreateBackupDownloadTask
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support