DTS Supports ET Migration
Applicable Scenarios
This article provides a hybrid cloud data migration solution, which is suitable for the express tunnel of the network products. In this solution, one end of the express tunnel is the user-side IDC instance or the cloud database of other competitors, and the other end is the network topology of the Baidu AI Cloud database instance. It migrates the users’ data from the user-side IDC instances or other competitors’ cloud databases to the Baidu AI Cloud instances.
Solution Introductions
Through the express tunnel of the network products, you can build a hybrid cloud between the user’s data center (IDC) or other competitors’ cloud databases and Baidu AI Cloud Virtual Private Cloud (VPC) to form network interoperability. You can use Data Transmission Service (DTS) for data migration.
As shown in the figure below, take the MySQL data migration as an example. When you use DTS to migrate the data in a hybrid cloud scenario, you need to access the source database by forwarding the data via the port or mapping the data via the BLB IP group because DTS cannot access the source database directly across multi-hop routes and migrate the data to the target database.
The rinetd tool is an efficient and practical port forwarding tool, which can solve the problem that DTS cannot be routed across multiple hops. It forwards the request for DTS to access the specified port on the BCC instance to the source database instance and then migrates the data in the source database instance to the target database instance.
Migration Prerequisites
The ET network between Baidu AI Cloud and the user-side IDC or other competitors has been open.
Ensure that there are private networks and subnets connected to the ET network under the user's Baidu AI Cloud account.
The type of the migrated data is the data type supported by Baidu AI Cloud data transmission service, such as MySQL.
Ensure that there is a database instance under the user's Baidu AI Cloud account that can be used as the destination, such as RDS instance.
Operating Steps
1. Use the rinetd tool
1.1 Create a BCC instance
On the Baidu AI Cloud homepage, select Product -> Cloud basics -> Computing -> Baidu Cloud Compute (BCC) for purchase.
- Select the Baidu Cloud Compute (BCC) with a small size of bcc.g3.c1m4.
- When you select the network type, make sure that the virtual private compute (VPC) and subnet have been connected to the ET network.
- You need to purchase an elastic public network IP eip to install the rinetd tool.
The following figure shows the purchase of the order for a cloud server BCC instance.
1.2 Install the rinetd tool
For the installation of the rinetd tool in the BCC instance, refer to https://pkgs.org/download/rinetd.
By clicking the link rinetd-0.62-9.el7.nux.src.rpm, refer to the Install Howto chapter for installation.
1.3 Modify the configuration file rinetd.conf.
Modify the configuration file by the following command: vim /etc/rinetd.conf.
Add a line at the end of the configuration file according to the format (ip1 port1 ip2 port).
Format description: ip1 may be a BCC instance ip or 0.0.0.0. port1 may be a BCC instance port, which is the same as the source port in the DTS task configuration. ip2 is the source database address. port2 is the source database port.
Example: 0.0.0.0 3306 192.168.64.69 3306, that is, all requests to access the port 3306 of the BCC instance will be forwarded to the instance of 192.168.64.69:3306.
1.4 Start the rinetd process
The default binary directory is /usr/sbin/rinetd under which you can run the rinetd binary file.
If you modify the rinetd.conf file, you need to kill the rinetd process, and then restart the rinetd process for the new configuration to take effect.
2. Configure the DTS Task Migration
2.1 Create a DTS task
On the management console of DTS, click the [Data transmission task] tab on the left and click the [Create data transmission task] button.
You can select the synchronization region, synchronization direction, and link specifications as the case may be.
Then, click [Next] to complete the purchase configuration. The page will jump to the task list page of the management console. An unconfigured DTS task will be added at the top of the list page, which is the migration task user created. Click [Configure task] to configure the task. If no new task is found on the list page after the page jumps, it is advisable to wait for a while (about one minute) and refresh the page again.
2.2 Configure a DTS task
First, enter the task connection configuration page, configure the MySQL self-built data storage instance as the source and select the self-built access type as the BCC self-built MySQL storage corresponding to the source.