From MySQL to MySQL
Supported Source and Destination Databases
Source DB |
Destination DB |
---|---|
|
RDS for MySQL |
Database Account Permission Requirements
When using DRS to create a workload replay task, you are advised to ensure that permissions of the source database account are the same as those of the destination database account before starting the task.
Precautions
To ensure smooth workload replay, read the following notes before creating a task.
Type |
Restrictions |
---|---|
Starting a task |
|
Parsing a workload file |
After a parsing file is selected, the file cannot be renamed. |
Replaying a database workload |
Only SELECT, INSERT, DELETE, UPDATE, and DDLs are supported. |
Stopping a task |
A finished task cannot be restarted. |
Prerequisites
- You have logged in to the DRS console.
- Your account balance is greater than or equal to $0 USD.
- For details about the DB types and versions supported by workload replay, see Supported Databases.
- If a subaccount is used to create a DRS task, ensure that an agency has been added. To create an agency, see Agency Management.
- You have read Precautions.
Procedure
- On the Workload Replay Management page, click Create Workload Replay Task.
- On the Create Replay Instance page, select a region and project, specify the task name, description, and the replay instance details, and click Create Now.
- Task information description
Figure 1 Workload replay task information
Table 3 Task information Parameter
Description
Region
The region where the replay instance is deployed. You can change the region.
Project
The project corresponds to the current region and can be changed.
Task Name
The task name must start with a letter and consist of 4 to 50 characters. It can contain only letters, digits, hyphens (-), and underscores (_).
Description
The description can contain up to 256 characters and cannot contain special characters !=<>&'\"
- Replay instance information
Figure 2 Replay instance information
Table 4 Replay instance settings Parameter
Description
Data Flow
Select To the cloud.
- Current cloud refers to the workload replay scenario where both source and destination databases are Huawei Cloud DB instances.
- To the cloud refers to the workload replay scenario where the destination database is a Huawei Cloud DB instance and data needs to be transferred to the cloud.
Source DB Engine
Select MySQL.
Source DB From
Platform where the source database is from. The audit log format varies depending on the source database. For details, see Audit Log Format.
Destination DB Engine
Select MySQL.
Network Type
Public network is used as an example.
Available options: Public network, VPC, VPN or Direct Connect
Destination DB Instance
The RDS for MySQL DB instance you created. Ensure that baseline data has been developed in the destination database.
Replay Instance Subnet
Select the subnet where the replay instance is located. You can also click View Subnets to go to the network console to view the subnet where the instance resides.
By default, the DRS instance and the destination DB instance are in the same subnet. You need to select the subnet where the DRS instance resides, and there are available IP addresses for the subnet. To ensure that the replay instance can be successfully created, only subnets with DHCP enabled are displayed.
Specify EIP
This parameter is available when you select Public network for Network Type. Select an EIP to be bound to the DRS instance. DRS will automatically bind the specified EIP to the DRS instance and unbind the EIP after the task is complete.
For details about the data transfer fee generated using a public network, see EIP Price Calculator.
- AZ
Figure 3 AZ
Table 5 Task AZ Parameter
Description
AZ
Select the AZ where you want to create the DRS task. Selecting the one housing the source or destination database can provide better performance.
- Enterprise Project and Tags
Figure 4 Enterprise Project and Tags
Table 6 Enterprise Project and Tags Parameter
Description
Enterprise Project
An enterprise project you would like to use to centrally manage your cloud resources and members. Select an enterprise project from the drop-down list. The default project is default.
For more information about enterprise project, see Enterprise Management User Guide.
To customize an enterprise project, click Enterprise in the upper right corner of the console. The Enterprise Project Management Service page is displayed. For details, see Creating an Enterprise Project in Enterprise Management User Guide.
Tags
- This setting is optional. Adding tags helps you better identify and manage your tasks. Each task can have up to 20 tags.
- If your organization has configured tag policies for DRS, add tags to tasks based on the policies. If a tag does not comply with the policies, task creation may fail. Contact your organization administrator to learn more about tag policies.
- After a task is created, you can view its tag details on the Tags tab. For details, see Tag Management.
If a task fails to be created, DRS retains the task for three days by default. After three days, the task automatically stops.
- Task information description
- After the replay instance is created, on the Configure Source and Destination Databases page, specify parameters in Source Database, Destination Database, and Task Settings. Then, click Test Connection for the destination database to check whether the destination database has been connected to the replay instance. After the connection test is successful, click Next.
- Source database information
Figure 5 Source database information
Table 7 Source database settings Parameter
Description
Workload File Source
Specifies where the workload file in the source database is from.
Access Key ID (AK)
Access key ID, which is a unique identifier used in conjunction with a secret access key to sign requests cryptographically.
Secret Access Key (SK)
Used together with the access key ID to sign requests cryptographically. It identifies a request sender and prevents the request from being modified.
- Based on the principle of least permission, the AK/SK permissions must be minimized. If you can use both temporary and permanent AKs/SKs, you are advised to use a temporary AK/SK. Permanent AKs/SKs are used only in scenarios where temporary AKs/SKs cannot meet requirements. For example, if a large number of logs need to be downloaded for a long time, temporary AKs/SKs may become invalid due to timeout.
- AK/SK information of the user is encrypted and temporarily stored in the system until the task is deleted.
Security Token
When a temporary AK/SK is used, Security Token must be used, and the recommended validity period is 24 hours. Otherwise, OBS bucket information may fail to be obtained during workload replay.
Bucket Name
Name of the OBS bucket for storing workload files.
Endpoint
OBS provides an endpoint for each region. An endpoint can be considered as the domain name of OBS in a region, and is used to process access requests from the region.
Workload File Prefix
Prefix of a file name in the OBS bucket. Only files whose names start with this prefix will be displayed.
Workload Type
Only Audit log is supported.
Workload File
Select the required workload file.
- Destination database information
Figure 6 Destination database information
Table 8 Destination database settings Parameter
Description
DB Instance Name
The RDS DB instance you selected when creating the task. This parameter cannot be changed.
Database Username
The username for accessing the destination database.
Database Password
The password for the database username.
SSL Connection
If SSL connection is required, enable SSL on the destination database, ensure that related parameters have been correctly configured, and upload an SSL certificate.
NOTE:- The maximum size of a single certificate file that can be uploaded is 500 KB.
- If SSL is disabled, your data may be at risk.
The username and password of the destination database are encrypted and temporarily stored on the DRS instance host during the workload replay. After the task is deleted, the username and password are permanently deleted.
- Task Settings
Figure 7 Task settings
Table 9 Task settings Parameter
Description
SQL Type
Select the SQL type to be replayed to the destination database. The default value is SELECT. The available options are SELECT, INSERT, UPDATE, DELETE, and DDL.
Replay Mode
You can select Performance or Transaction.
- In performance mode, you can set how many concurrent connections are allowed. SQL statements are replayed to the destination database based on a set number of connections. The SQL execution sequence in the source database may be different from that in the destination database. The replay performance is better.
- In transaction mode, you cannot set how many concurrent connections are allowed. The number of connections is dynamically adjusted based on the connections in the source database logs to ensure that transaction SQL statements in the same connection of the source database are executed in sequence.
Filter out SQLs
The system fuzzily matches SQL statements based on the entered conditions, ignores case sensitivity, and filters SQL logs to be replayed to the destination database. The SQL logs that meet the conditions will be filtered out. You can configure up to 10 filtering rules.
Filter out SQLs Without Conditions
This option is used to filter out SQL statements of the SELECT, UPDATE, and DELETE types that do not contain conditions (that is, filter out SQL statements without a where condition).
Maximum Concurrent Connections
The number of replay threads configured for a workload replay task. The default value is 8. The value ranges from 1 to 100.
Acceleration Configuration
The percentage of the replayed SQLs to the SQLs executed on the source database within the same period. The percentage cannot exceed the maximum performance of the workload replay task. The value can be Unlimited, 100%, or 200%.
- Source database information
- On the Check Task page, check the replay task.
- If any check fails, review the cause and rectify the fault. After the fault is rectified, click Check Again.
- If all check items are successful, click Next.
- On the displayed page, specify Start Time, Send Notification, SMN Topic, and Stop Abnormal Tasks After and confirm that the configured information is correct and click Submit to submit the task.
Figure 8 Task startup settings
Table 10 Task startup settings Parameter
Description
Start Time
Set Start Time to Start upon task creation or Start at a specified time based on site requirements.
NOTE:After a replay task is started, the performance of the source and destination databases may be affected. You are advised to start a replay task during off-peak hours.
Send Notifications
SMN topic. This parameter is optional. If an exception occurs during workload replay, the system will send a notification to the specified recipients.
SMN Topic
This parameter is available only after you enable Send Notifications and create a topic on the SMN console and add a subscriber.
For details, see Simple Message Notification User Guide.
Stop Abnormal Tasks After
Number of days after which an abnormal task automatically stops. The value must range from 14 to 100. The default value is 14.
NOTE:Tasks in the abnormal state are still charged. If tasks remain in the abnormal state for a long time, they cannot be resumed. Abnormal tasks running longer than the period you set (unit: day) will automatically stop to avoid unnecessary fees.
- After the task is submitted, view and manage it on the Workload Replay Management page.
- You can view the task status. For more information about task status, see Task Statuses.
- You can click in the upper right corner to view the latest task status.
- By default, DRS retains a task in the Configuration state for three days. After three days, DRS automatically deletes background resources, but the task status remains unchanged. When you reconfigure the task, DRS applies for resources for the task again.
- For a public network task, DRS needs to delete background resources after you stop the task. The EIP bound to the task cannot be restored to the Unbound state until background resources are deleted.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot