Updated on 2023-12-13 GMT+08:00

Restoring a Replica Set Instance to a Point in Time

You can restore a replica set instance to a specific point in time.

When you enter the point in time that you want to restore the instance to, DDS downloads the most recent full backup file from OBS to the instance. Then, incremental backups are also restored to the specified point in time on the instance. Data is restored at an average speed of 30 MB/s.

Precautions

  • Currently, you can restore a replica set instance to a new or original DB instance at a point in time.
  • Only replica set instances of versions 4.0, 4.2, and 4.4 can be restored to a point in time.
  • Data can be restored to a specific point in time only after the automated backup policy is enabled.
  • The local database is not included in the databases that can be restored to a specified time point.
  • To ensure data security, the dropDatabase operation is blocked when the incremental backup is restored to a point in time. Empty databases or views may exist after the restoration. You can delete them.
  • Only whitelisted users can use this function. You need to submit a service ticket to apply for this function. In the upper right corner of the management console, choose Service Tickets > Create Service Ticket to submit a service ticket.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, click the replica set instance name.
  5. In the navigation pane on the left, choose Backups & Restorations.
  6. On the Backups & Restorations page, click Restore to Point in Time.

    Figure 1 Restoring to a point in time

  7. Select the date and time range, select or enter a time point within the acceptable range, and select Create New Instance or Restore to Original.

    Figure 2 Restoring to a point in time

  8. On the displayed page, the DB instance is restored based on the restoration method you selected in 7.

    • Create New Instance

      The Create New Instance page is displayed for you to create an instance using the backup data. The new DB instance is independent from the original one.

      • You are recommended to deploy the restored DB instance in a different AZ to ensure that applications will not be adversely affected by the failure in any single AZ.
      • The database type, DB instance type, compatible MongoDB version, storage engine, and storage type must be the same as those of the original and cannot be changed.
      • The storage space is the same as that of the original instance by default. You can increase the storage space, but you cannot reduce it.
      • Other settings have default values and can be modified. For details, see Buying a Replica Set Instance.
    • Restore to Original
      • Restoring backup data to the original instance will overwrite existing data on the instance and cause the instance to be unavailable during the restoration. Exercise caution when performing this operation.
      • The administrator password of the instance remains unchanged after the restoration.
      • If the backup method is logical backup, the backup cannot be restored to the original instance.

      Check that the status of the DB instance on the Instances page is Restoring.