百度智能云

All Product Document

          Database Transmission Server

          Use DTS to Implement MongoDB-MongoDB Data Migration

          Applicable Scenarios

          This article is applicable for using Baidu AI Cloud Data Transmission Service DTS (hereinafter referred to as DTS) to migrate data from a cloud MongoDB database instance or self-built MongoDB database instance to a cloud MongoDB database instance or self-built MongoDB database instance.

          Migration Preconditions

          The MongoDB database instance as the source of the migration has been created, and the version is 3.4 or 3.6.

          The MongoDB database instance as the destination of the migration has been created, the version is 3.4 or 3.6.

          MongoDB Migration Requirements

          Privilege requirements
          For the source and destination database instances, the user needs to provide an account that satisfies the root role for data migration.

          Granularity requirements
          The current MongoDB to MongoDB migration only supports migration at the instance level granularity.

          Operation Steps

          1. Create a Migration Task

          In the DTS management console, click [Data Transfer Task] TAB tab on the left, and click [Create Data Transfer Instance].

          If your source is a cloud database DocDB for MongoDB instance, select Baidu AI Cloud Database as the source location; if it is a public network/BBC/BCC/DCC self-built MongoDB instance, select from Build data storage as the source location.

          If your destination is a cloud database DocDB for MongoDB instance, select Baidu AI Cloud Database as the destination location. If it is a self-built MongoDB instance on the public network/BBC/BCC/DCC, select from Build data storage as the destination location.

          Cross-region or the same region can be selected according to the actual situation.

          Then click [Next] to complete the purchase configuration. The page will jump to the task list page of the management console. At the top of the list page, there will be a new unconfigured DTS task, which is the migration task you just created. Click [Configuration Task] to configure the task. If no new tasks appear on the list page after the page jumps, it is recommended to wait for a while to refresh the page.

          2. Configuration Task

          First enter the task connection configuration page. The following takes the source as self-built data storage and the destination as Baidu AI Cloud Database as an example for configuration.

          To configure the source, take self-built data storage as an example, and just select the self-built instance corresponding to the source.

          Select MongoDB as the data type, fill in the corresponding instance account and password, and click [Test Connectivity] to test the connectivity of the source instance.

          Configure the destination. Take Baidu AI Cloud Database as an example. The destination data type will be automatically matched according to the source data type. Select the cloud service DocDB MongoDB instance to migrate into, enter the corresponding account password, and click [Test Connectivity] to test the connectivity of the destination.

          Click [Authorize Whitelist to go to the next step], you can choose the migration type of the source instance, full migration or incremental migration or both, according to actual needs. Currently, the migration from MongoDB to MongoDB only supports instance-level migration.

          After selecting the migration type, you can click [Save and pre-check] to save the configuration and pre-check, or click [Save] to save the configuration.

          3. Start Migration

          After saving the configuration, you can start the pre-check on the task list page. If you click [Save and pre-check] when saving the configuration task, it does not need to perform the pre-check again.

          If the pre-check fails, you can check the relevant configuration according to the error message.

          After the pre-check is successful, the task can be started.

          Previous
          Use DTS to Implement Oracle-MySQL Data Migration
          Next
          Use DTS to Achieve Data Migration Taking Elasticsearch as Destination