Data Recovery

Last updated: 2020-07-07 12:17:59

    Operation Scenarios

    This document describes how to restore TencentDB for MongoDB data in the console.

    • The oplog space of an instance is a capped collection. When the collection space is used up, newly inserted elements will overwrite the initial header elements. If the oplog space is overwritten, backup and restoration may fail, and it will be impossible to guarantee the time point for data restoration. Therefore, please set a reasonable oplog space size based on your business conditions.
    • Please pay close attention to the Oplog Time Difference metric in System Monitoring on the instance management page. The smaller the metric value is, the greater the risk of oplog being overwritten when your business has frequent write, update, and deletion operations.

    Prerequisites

    The instance data has been backed up. For more information, please see Backing up Data.

    Directions

    1. Log in to the TencentDB for MongoDB Console and click an instance name in the instance list to enter the instance management page.
    2. Select Backup and Rollback > Backup and Restore and click Roll back Instance in the column of the backup file to be rolled back.
    3. On the rollback page, you can select the time point to be rolled back to and rollback type (rollback of entire instance or database table rollback).
      • If you select Rollback of entire instance, the system will create a temp instance free of charge to store the rollback data. The username and password of the temp instance will be the same as those of the original instance. The original instance will remain unchanged and the business will not be affected.

        Within 48 hours after the rollback of entire instance is completed, you need to access the temp instance and confirm the data rolled back. For the temp instance, you can choose to perform:

        • "Promotion": promote the temp instance to a formal instance independent of the original instance for use by the business.
        • "Replacement": replace the original instance with the temp instance (the private IP of the original instance will be bound to the temp instance).
          If no operation is performed after 48 hours, the temp instance will be terminated by the system.
      • If you select Database table rollback, the system will roll back the original instance according to the selected database table, name of the database table after rollback, and rollback time. After the rollback is completed, please confirm the data rolled back promptly.
        • As physical backup does not support database table rollback, you cannot select database table rollback if there is a physical backup in the current backup list.
        • A single database table rollback task currently supports up to 20 database tables.
        • Sharded clusters v3.6 do not support database table rollback.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help