Creating a Storage Migration Workflow
This section describes how to create a storage migration workflow from the predefined template.
The following regions are supported:
- LA-Santiago
- LA-Sao Paulo
- TR-Istanbul
- AP-Bangkok
- AP-Singapore
- AP-Jakarta
- ME-Riyadh
- CN North-Beijing4
- CN East-Shanghai1
Notes and Constraints
- For more information, see What Are the Restrictions on Using MgC for Storage Migration?
- Data in the Deep Cold Archive storage of Alibaba Cloud OSS cannot be restored using the restoration function of MgC. You need to manually restore the data before migration.
Warnings
When you create a workflow, there are three options for Overwrite Existing: Never, Always, and If older or different size. If you choose Never, restarting the migration task after interruptions or pauses may cause incomplete data migration, but the task may still be displayed as successful, which affects data integrity. Use the Never option with caution.
Prerequisites
- You have created an OBS bucket or SFS file system on Huawei Cloud.
- You have created a migration cluster.
Procedure
- Sign in to the MgC console.
- In the navigation pane on the left, choose Migrate > Workflows. Select a migration project in the upper left corner of the page.
- Click Create Workflow in the upper right corner of the page.
- In the Storage Migration card, click Preview Steps to view the stages and steps predefined in the template and the detailed description of each stage and step. Steps of the Automated type will be automatically performed by MgC. Click Configure Workflow in the lower right corner.
- Set workflow basics based on Table 1.
Table 1 Basic parameters Parameter
Description
Name
Enter a workflow name.
Region
Select a region you are migrating to.
Description
Enter a description.
Cluster
Select a migration cluster. The cluster consists of a master node and several migration and list nodes. If no cluster is available, create a cluster.
NOTICE:A master node is created by the system in a migration cluster by default. You do not need to configure it.
- Configure the migration source and target based on Table 2 and Table 3.
Table 2 Parameters for configuring a migration source Parameter
Description
Remarks
Location Type
The supported migration sources include:
- Huawei Cloud OBS
- Alibaba Cloud OSS
- Baidu Cloud BOS
- Tencent Cloud COS
- Kingsoft Cloud KS3
- Qiniu Cloud KODO
- UCloud US3
- Amazon S3
- Azure Blob Storage
- NAS_GFS
- NAS_SMB
- NAS_NFS_V3_MOUNT
- NAS_NFS_V3_PROTOCOL
- HTTP/HTTPS data source
-
AK
Enter the AK of the source cloud account.
These parameters are available when cloud storage is selected for Location Type.
SK
Enter the SK of the source cloud account.
Bucket
Enter the name of the source bucket to be migrated.
Endpoint
Enter the endpoint of the region where the source bucket is located.
For example, if Location Type is set to Alibaba Cloud OSS and the source bucket is located in CN East 1 (Hangzhou), enter oss-cn-hangzhou.aliyuncs.com.
Type
Set this parameter based on the source bucket type. You can view the bucket type in the basic information.
This parameter is available when Huawei Cloud OBS is selected for Location Type.
APPID
Enter the APPID of your Tencent Cloud account.
NOTE:You can view the APPID on the account information page of the Tencent Cloud console.
This parameter is available when Tencent Cloud COS is selected for Location Type.
Authentication Type
The following authentication types are supported:
- Connection string
- Storage account name and key
For details about how to obtain the credentials, see How Do I Obtain Credentials for Accessing Microsoft Azure?
This parameter is available when Azure Blob Storage is selected for Location Type.
List Path
Enter the path where the lists of files to be migrated are stored. These lists must be stored in the same region as the target bucket.
You need to write the URLs of files to be migrated and their new names at the target into the lists. Each line in the list can contain only one URL and one file name.
Restrictions on list files are:
- The files must be in .txt format, and their metadata Content-Type must be text/plain.
- A single file can contain a maximum of 100,000 rows.
- A single file cannot exceed 300 MB.
- A maximum of 10,000 list files can be stored in the folder.
- The files must be in UTF-8 without BOM.
- The length of each line in a file cannot exceed 65,535 characters, or the migration will fail.
- The Content-Encoding metadata of the files must be left empty, or the migration will fail.
- In the files, a tab character (\t) must be used to separate the URL and new file name in each line. The format is [URL][Tab character][New file name]. Only the Chinese and special characters in the names must be URL encoded.
- Spaces are not allowed in each line in a file. Spaces may cause migration failures because they may be mistakenly identified as object names.
These parameters are available when HTTP/HTTPS data source is selected for Location Type.
File System Address
Enter the mount address of the source file system. The format is IP address:/ or IP address:/xxx, for example, 192.1.1.1:/0001.
These parameters are available when Location Type is set to NAS_SMB, NAS_NFS_V3_MOUNT, or NAS_NFS_V3_PROTOCOL.
Path
Enter the directory where files to be migrated are located. The format is /Folder name.
Username
Enter the username of the account that can access all files in the source file system, for example, administrator.
These parameters are available when Location Type is set to NAS_SMB.
Password
Enter the password of the account.
Domain on Windows
Enter the domain of the source node.
NOTE:You only need to enter the content before .com. For example, if the domain is test.com, enter test.
Table 3 Parameters for configuring a migration target Parameter
Description
Remarks
Location Type
Select Huawei Cloud storage based on the source storage type.
-
AK
Enter the AK of the Huawei Cloud account you are migrating to.
These parameters are available when Location Type is set to Huawei Cloud OBS.
SK
Enter the SK of the Huawei Cloud account you are migrating to.
Bucket
Select the OBS bucket you are migrating your data to.
Endpoint
Enter the endpoint of the region where the target OBS bucket is located. For example, if the target bucket is located in the CN North-Beijing4 region of Huawei Cloud, enter obs.cn-north-4.myhuaweicloud.com.
NOTE:If the migration source is an OBS bucket, you can view the endpoint in the OBS bucket overview.
Specify Prefix
Specify a prefix to rename or relocate objects migrated to the target bucket. For example, if you specify the prefix /D, source file /A/B/C.txt will be relocated to /D/A/B/C.txt after being migrated to the target bucket. For details, see:
File System Address
Enter the mount address of the target file system. To obtain the mount address, go to the SFS file system list and click the icon next to the address in the Mount Point column.
These parameters are available when Location Type is set to NAS_SMB or NAS_NFS_V3_MOUNT.
Path
Enter the directory for storing files migrated. The format is /Folder name.
Username
Enter the username of the account that can access all files in the target file system, for example, administrator.
These parameters are available when Location Type is set to NAS_SMB.
Password
Enter the password of the account.
Domain on Windows
Enter the domain of the target node.
NOTE:You only need to enter the content before .com. For example, if the domain is test.com, enter test.
- Configure the migration task based on Table 4.
Table 4 Parameters for configuring a migration task Parameter
Value
Description
Task Type
Full migration
Migrates all data in the source bucket or specified paths.
List migration
Migrates files recorded in the list files.
In List Path box, enter the path of the object lists stored in the target bucket. Restrictions on an object list file vary with the target location.
- Target location: Huawei Cloud OBS
- An object list file cannot exceed 30 MB.
- An object list file must be a .txt file, and the Content-Type metadata must be text/plain.
- An object list file must be in UTF-8 without BOM.
- Each line in an object list file can contain only one object name, and the object name must be URL encoded.
- Each line in an object list file cannot exceed 16 KB, or the migration will fail.
- The Content-Encoding metadata of an object list file must be left empty, or the migration will fail.
- An object list file can contain a maximum of 10,000 lines.
- Target location: NAS
- An object list file cannot exceed 30 MB.
- An object list file must be a .txt file.
- An object list file must be in UTF-8 without BOM.
- Each line in an object list file can contain only one object name, and the object name must be URL encoded.
- Each line in an object list file cannot exceed 16 KB, or the migration will fail.
- An object list file can contain a maximum of 10,000 lines.
Prefix migration
This option is only available for migration from cloud storage.
If you enter a file name or name prefix in the Prefix box, only the objects that exactly match the specified name or prefix are migrated.
NOTICE:- If the files to be migrated are stored in the root directory of the source bucket, add their name prefixes directly. If the files are stored in a non-root directory, add their directories and name prefixes in the format of Directory/Prefix.
- Use commas (,) to separate multiple prefixes.
Concurrent Subtasks
-
Specify the maximum number of concurrent subtasks. There cannot be more than 10 concurrent subtasks for each online migration node. For example, if there are 2 online migration nodes, the maximum number of subtasks can be 20 or any number below.
Overwrite Existing
Never
Files existing at the target will never be overwritten.
WARNING:- If you choose Never for the initial migration, the attributes of involved parent folders at the source will not be migrated to the target. As a result, the folder attributes may be incomplete at the target. To avoid this issue, use the Never option with caution for the initial migration.
- If a migration task is paused or interrupted and then restarted or resumed, the Never option will cause the system to skip files that were not completely migrated earlier, but the task may still be marked as successful. This affects data integrity. To avoid this issue, use the Never option with caution.
Always
Files existing at the migration target will always be overwritten.
If older or different size
- Files that already exist at the target will be overwritten if they are older than or have different sizes from the paired files at the source.
- Verification will be performed for folders after their contents are migrated. Folders that already exist at the target will be overwritten if they have different last modification times, sizes, or permissions from the paired folders at the source.
NOTE:
For empty folders, the overwrite policy is the same as that for files.
Migrate Metadata
-
Decide whether to migrate metadata.
- If you select this option, object metadata will be migrated.
- If you do not select this option, only the Content-Type and Content-Encoding metadata will be migrated.
Clear Cluster
-
Determine whether to clear the migration cluster after the migration is complete.
- If you select this option, a step for clearing the migration cluster will be created in the workflow. You can also choose whether to clear resources used by the cluster, such as NAT gateways, security groups, and VPCEP resources.
- If you do not select this option, a step for clearing the migration cluster will not be created in the workflow.
- Target location: Huawei Cloud OBS
- (Optional) Configure advanced options based on Table 5.
Table 5 Advanced options Parameter
Description
Remarks
Target Storage Class
Choose the storage class that your data will be migrated to in the target bucket. For details about storage classes, see Introduction to Storage Classes.
-
Enable KMS Encryption
- If you do not select this option, whether migrated data will be encrypted in the target bucket depends on the server-side encryption setting of the bucket.
- If you select this option, all migrated objects will be encrypted before they are stored in the target bucket.
NOTE:- Using KMS to encrypt migrated data may slow down the migration speed by about 10%.
- This option is only available when KMS is supported in the region you are migrating to.
This parameter is only available for migrations to Huawei Cloud OBS.
Restore Archive Data
- If you do not select this option, the system directly records archive objects in the list of objects that failed to be migrated and continues to migrate other objects in the migration task.
- If you select this option, the system automatically restores and migrates archive objects in the migration task. If an archive object fails to be restored, the system skips it and records it in the list of objects that failed to be migrated and continues to migrate other objects in the migration task.
NOTE:The system will restore archive data before migrating it, and you pay the source cloud platform for the API requests and storage space generated accordingly.
-
Filter Source Data
Filter files to be migrated by applying filters. For details about the filters, see Source Data Filters.
Download Data from CDN
If the default domain name cannot meet your migration requirements, then as long as the source cloud service provider supports custom domain names, you can bind a custom domain name to the source bucket, and enable the CDN service on the source platform to reduce data download expenses. Enter a custom domain name in the Domain Name text box and select a transmission protocol. HTTPS is more secure than HTTP and is recommended.
If the migration source is the Alibaba Cloud OSS or Tencent Cloud COS, you also need to select an authentication type and enter an authentication key.
Send SMN Notification
Determine whether to use SMN to get notifications about migration results.
- If you do not select this option, no SMN messages are sent after the migration.
- If you select this option, after the migration, SMN messages are sent to the subscribers of the selected topic. You can select the language and trigger conditions for sending messages.
Limit Traffic
Allocate the maximum bandwidth to be used by the workflow during a specified period.
- If you do not select this option, migration traffic is not limited.
- If you select this option, limit the migration traffic by setting Start Time, End Time, and Bandwidth Limit.
For example, if you set Start Time to 08:00, End Time to 12:00, and Bandwidth Limit to 20 MB/s, the maximum migration speed is limited to 20 MB/s when the migration task is running from 08:00 to 12:00. The migration speed is not limited beyond this period.NOTE:
- The rate limit ranges from 0 MB/s to 1,048,576 MB/s.
- A maximum of five rules can be added.
- The time is the local standard time of the region you are migrating to.
-
Schedule Migration
Schedule the migration to automatically run during a period.
- If you do not select this option, you need to manually start or stop the migration.
- If you select this option, the migration runs during the specified period and stops beyond that period.
- If you set Start Time to 08:00 and End Time to 12:00, the migration task runs from 08:00 to 12:00 every day. The migration stops beyond that period.
- If you set Start Time to 12:00 and End Time to 08:00, the migration runs from 12:00 of the current day to 08:00 of the next day. The migration stops beyond that period.
-
- Click Next: Confirm.
- Confirm the workflow settings, and click Confirm. The Run Workflow dialog box is displayed, which indicates that the workflow has been created.
- If you want to start the migration immediately, click Confirm to run the workflow.
- If you want to add a stage or step to the workflow, click Cancel. The workflow enters a Waiting state, and the migration is not started. To start the migration, click Run in the Operation column.
- On the migration workflow details page, view the workflow settings and the migration progress. You can also perform the following operations:
- Move the cursor to the migration progress bar of a resource. In the displayed window, view the migration details about the resource.
- When a migration reaches a step that requires manual confirmation, place the cursor on the progress bar and click Confirm next to the step status in the displayed window. The migration can continue only after you confirm.
- In the Basic Information area, click Manage next to the cluster name. The cluster details page is displayed on the right. On the displayed page, you can:
- Add, edit, or delete traffic limiting rules to control cluster traffic based on your requirements.
- Add or delete migration nodes or list nodes, or upgrade plug-ins for existing nodes as required.
- (Optional) Click the migration progress bar or click Migration Progress in the window displayed when you move the cursor to the progress bar. The migration details page is displayed on the right. You can view the task overview and progress details. You can also perform the following operations:
Source Data Filters
The following table describes the rules and restrictions for setting source data filters.
The following table lists example pattern rules for different scenarios.
Assume that you want to migrate the directory test in the source storage system.
- If the source storage system is a NAS device, enter /test as an "include" pattern.
- If the source storage system is an object storage system, enter test as an "include" pattern.
Scenario |
Example Pattern for NAS |
Example Pattern for Object Storage |
Description |
---|---|---|---|
File paths that end with xx |
/xx /**xx |
xx/**xx |
xx can be an expression containing asterisks (*) and question marks (?). |
Files whose names start with xx in the root directory |
/xx*
|
/xx*
|
|
File paths that start with xx |
/xx** /xx/** |
xx** xx/** |
|
Files whose names contain xx |
**xx* |
**xx* |
|
File paths that contain xx |
**xx** |
**xx** |
|
File paths that start with xx and end with yy. |
/xx**yy |
xx**yy |
xx and yy can be expressions containing asterisks (*) and question marks (?). |
File paths that end with xx or yy |
**{xx,yy} |
**{xx,yy} |
|
Files whose names contain xx or yy |
**{xx,yy}* |
**{xx,yy}* |
|
Files paths that contain xx or yy |
**{xx,yy}** |
**{xx,yy}** |
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